Explanation:
come on, now, this is one of the (if not THE) most important formula you need to remember for the rest of your life :
a² + b² = c²
with c being the Hypotenuse (the side opposite of the 90° angle), a and b are the legs.
so, in our case, we have then
x² = 5² + 12² = 25 + 144 = 169
x = sqrt(169) = 13