This paper provides another proof of Fermat's theorem. As in the previous work, a geometric approach is used, namely: instead of integers a, b, c, a triangle with side lengths a, b, c is considered. To preserve the completeness of the proof of the theorem in this work, the proof is repeated for the cases of right and obtuse triangles. In this case, the Fermat equation ap+bp=cp has no solutions for any natural number p>2 and arbitrary numbers a, b, c. When considering the case when the numbers a, b, c are sides of an acute triangle, it is proven that Fermat’s equation has no solutions for any natural number p>2 and non-zero integer numbers a, b, c. Numbers a=k, b=k+m, c=k+n, where k, m, n are natural numbers that satisfy the inequalities n>m, n<k+m, exhaust all possible variants of natural numbers a, b, c, which are the sides of the triangle. In an acute triangle, the following condition is additionally satisfied:
 To study the Fermat equation, an auxiliary function f(k,p)=kp+(k+m)p–(k+n)p, is introduced, which is a polynomial of natural degree p in the variable k. The equation f(k,p)=0 has a single positive root for any natural
 A recurrent formula connecting the functions f(k,p+1) and f(k,p) has been proven: f(k,p+1)=kf(k,p)-[n(k+n)p-m(k+m)p]. The proof of the main proposition 2 is based on considering all possible relationships between the assumed integer solution of the equation f(k,p+1)=0 and the number corresponding to this solution
 The proof was carried out using the mathematical apparatus of number theory, elements of higher algebra and the foundations of mathematical analysis. These studies are a continuation of the author’s works, in which some special cases of Fermat’s theorem were proved