Sum of the squares of the two legs is 2x²+6x+117=4x²-108x+729 (hypotenuse squared)
2x²-114x+612=0
x²-57x+306=0=(x-6)(x-51)
Therefore x=6 or 51. We can reject x=6 because x-6 is the length of a leg. So x=51.
The sides are 45, 60 and 65 (Pythagorean 5-12-13 triangle).