You use the pythagoras theorem to find the lenght of the hypotenuse:
You have the measure of the two legs: 40 and 9:
6.5m questions
8.5m answers