For any lengths to be sides of a right angled triangle, the sum of the squares of the two of them should be equal to the square of the third.
Here,
92+402=81+1600=1681=412
Since the squares of 9 and 40 add up to the square of 41, these form a Pythagorean triplet
Hence, they can be used to represent the three sides of a right-angled triangle.