Fermat's last theorem would prove to be an extremely difficult subject to write about. It forms part of the study of Diophantine equations which certainly isn't easy to 'get your head around'. ('Diophantine Equations' was the title for my university thesis. Much of the mathematics is well beyond that normally encountered at first degree level. Additionally, I had to translate many of the most important texts from the form of German used several centuries ago).
If you were to attempt to write anything about Femat's last theorem without reference to the higher levels of mathematics, you'd find that essestially, there is only one source of reference. i.e.Simon Sigh's 1997 award-winning book. (There are other books but they cover much of the same ground). Using one (or a very limited number) of reference sources would be unlikely to impress whoever is to assess the essay.
"Was Math Discovered or Invented" is a far more general topic. There many different ways of tackling the topic. There's plenty of scope for examining mathematics across the ages (starting with the ancient civilizations). I'll let you do the hard work but I hope that your conclusion will be that, while most of the development of mathematics has come through 'discovery', many of the most important advances have come through 'invention'. (The most important invention of all time is thought, by many people, to be the representation of the number zero. Until this invention, both mathematics and science could only make very slow progress. Afterwards, great strides were possible. Another important invention was the concept of 'i' to represent the square root of -1. Without such a concept, much of mathematical research would have stagnated).
Ignore Fermat. Go for 'Discovery vs. Invention'. It'll be easier, more interesting and more rewarding.
Chris