Explanation:
since it is a right-angled triangle, the principle of Pythagoras has to be fulfilled :
c² = a² + b²
c being the Hypotenuse (the side opposite of the 90° angle), which is in our case (x + 32).
a and b are the legs.
so
(x + 32)² = x² + (x + 31)²
x² + 64x + 1024 = x² + x² + 62x + 961
2x + 1024 = x² + 961
x² - 2x - 63 = 0
as 63 = 7×9
and -9 + 7 = -2
we can conclude that this quadratic equation is the same as the following factorization :
(x + 7)(x - 9) = 0
we have 2 solutions :
x = -7
x = 9
as x is also the length of a side, the negative solution does not make any sense.
so, x = 9 is our solution.
that means the sides of the triangle are
x = 9
x + 31 = 40
x + 32 = 41
and the perimeter of the triangle is
9 + 40 + 41 = 90