I am not able to visualize these kinds of problems. So would really appreciate an explanation along with the ans.
A fast diagram for you...
I've used the similar triangles funda, since the sun would emit similar light and hence generate similar shadow for both trees.
Try getting some 10th grade trig maths books from the school guys. It will help you refresh.
A question - can we still use the similar triangles funda is the two shadows of two trees do not overlap like the graph you draw?
Yes, as long as you're far, far away from the sun (for which, earth qualifies), it doesn't matter where in the park the trees are because the angle cast by the light rays (i.e., the angle b/w the diagonal light ray and the base shadow) will not be affected.
If you were to measure the shadows at two different times of the day (i.e., sun's position changes), then the angles will not be the same, and you'll have to use a different approach.