Explanation:
what is it you don't understand ?
the Pythagoras theorem is very simple :
a² + b² = c²
c is always the Hypotenuse (the side opposite of the 90° angle, and therefore the longest side). a and b are the legs.
there is really not much else to it.
for whatever triangle side is then on the single equation side, we need to pull the square root of it for the actual length.
1.
Hypotenuse² = 7² + 24² = 49 + 576 = 625
Hypotenuse = sqrt(625) = 25
2.
diagonal² = 15² + 8² = 225 + 64 = 289
diagonal = sqrt(289) = 17
3.
41² = height² + 40²
height² = 41² - 40² = 1681 - 1600 = 81
height = sqrt(81) = 9
4.
17.5² = 9² + distance²
distance² = 17.5² - 9² = 306.25 - 81 = 225.25
distance = sqrt(225.25) = 15.00833102... miles