The pythagorean theorum tells us that A2 + B2 = C2
Let's call the shorter leg A
The longer leg would be B=3A-5 (read it backwards - 5 less than 3 times A)
The hypoteneuse, C=6A-13. (Backwards it reads 13 less than 6 times A)
The pythagorean becomes:
A2 + (3A-5)2 = (6A-13)2
Expanding by the foil method:
A2 + (9A2 - 30A + 25) = (36A2 -78A -78A + 169)
Combining like terms:
10A2 - 30A +25 = 36A2 -156A + 169
26A2 -126A +145 = 0
Using the quadratic equation where A=26 B=-126 C= 144
The equation provides 2 answers, 3 and 1.84615, which yields a negative length hypoteneuse, which can be ignored.
For A=3, B=4 and C=5, which is the simplest whole number right triangle.