Since this situation can be represented by a right triangle, we can use the pythagorean theorem. Doing so, we have:
[tex]\begin{gathered} a^2+b^2=c^2\text{ } \\ (30)^2+(40)^2=c^2\text{ (Replacing)} \\ 900+1600=c^2\text{ (Raising both numbers to the power of 2)} \\ 2500=c^2\text{ (Adding)} \\ \sqrt[]{2500}=\sqrt[]{c^2} \\ 50=c\text{ (Taking the square root of both sides)} \\ \text{The answer is 50 ft} \end{gathered}[/tex]