The two triangles shown in the illustration are similar. The vertical side of the larger has length 20 ft, and the vertical side of the smaller is (20-x) ft.
Write and solve an equation of ratios:
(20-x) 40
-------- = ---------
20 50
Cross-multiplying, 50(20-x) = 800; then 20-x = 800/50 = 16.
Solving for x: 20-x=16; rearranging terms, 4=x
You could be 4 ft tall and still be in the shade of the tree.