in a Pythagorean triplet, the sum of squares of 2 small numbers is equal to the square of the largest number.
so,
if 7^2 + 24^2 = 25^2
then its a pythagorean triplet.
7^2 = 49
24^2=576
25^2=625
and 49+576=625
so 7,24,25 is a pythagorean triplet.
Similarly, 40^2 = 1600
42^2 = 1764
58^2 = 3364
1600+1764=3364
Hence it is also a pythagorean triplet