The first thing you need to remember is this equation 3^2+4^2=5^2.This equation is correct.You can check it using Pythagorean Theorem.(a^2+b^2=c^2)
So the hypotenuse is 15 right.One length is 3 more than the other right.So what I did was proportions.The hypotenuse of 3^2+4^2=5^2 is 5 units.This one is 15.So I multiplyed each leg by 3.And it gave me 9^2+12^2=15^2.This is correct because one Leg is 3 units more than the other one.
1st leg- 9 units
2nd leg-12 units
3rd leg-15 units