Since this is a right triangle, the sides are related by the Pythagorean theorem. a^2+b^2=c^2
Legs are a and b. Hypotenuse is c. Plugging in the values gives you:
9^2 + 12^2 = x^2
81 + 144 = x^2
X^2 = 225
Taking the square root of both sides gives you x=15