We know that the perimeter is 72 meters, so we have

Now we can use the pythagorean theorem: the sum of the squares of the legs is the square of the hypotenuse:

Expand the squares to get

Bring everything to the right hand side to get

Divide both sides by 8:

This equation has solutions

This solutions would yield the following side lengths:


Since we can't have negative side lengths, we can only accept the solution x=9.
In fact, you can check that 18,24,30 is a pythagorean triplet, i.e.
