From the diagram of the question attached, The length of the legs are 25 m and 40 m . This legs form a right angle triangle with the length of the swimming course (L).
Pythagoras theorem states that for a right angle triangle with hypotenuse a and legs b and c, then:
a² = b² + c²
In the triangle, the length of the swimming course (L) is the hypotenuse and the two legs are 25 m and 40 m. Using Pythagoras: