The broken flagpole forms a right triangle, where the vertical leg is the piece still standing and the hypotenuse is the broken piece.
So, the original length is the sum of the hypotenuse and the vertical leg.
The hypotenuse can be found using the pythagorean theorem:
[tex]h=\sqrt{7^2+24^2}=25[/tex]
So, the flag was originally [tex]7+25=32[/tex] meters long.