Hello there!
You would use the Pythagorean theorem, a^2 + b^2 = c^2, where a and b are legs and c is the hypotenuse.
a^2 + b^2 = c^2
7^2 + 24^2 = c^2
49 + 576 = c^2
625 = c^2
Now square root both sides:
Sq root of 625 = c
25 = c
So, the hypotenuse is 25 cm. Hope this helps!