You do not included the picture. I can guess that p is the angle formed by the shadow and the hypotenuse of the right triangle.
The the trigonometric ratio is tan(p) = x/s
Where x is the height of the tree and s is the length of the shadow.
Then, x =s*tan(p) = 24 feet * 0.7 = 16.8 feet