Consider a right angled triangle ABC, right angled at B. Now let AB be the tree (AB = 18m) and BC be its shadow. Refer the attachment.

Now according to the question, we have <C = 45 (as angle of elevation of sun is 45 degrees)
Thus we have tan45 = AB/BC
or, 18/BC = 1
or, BC = 18m
Now as BC = 18m, length of shadow = 18 metres.

Hope that helps !!
1 5 1
Given: The angle is 45 degrees Draw a triangle with vertices A,B and C. Angle ACB is 45 degrees. BC is the length of the shadow AB is the length of the tree tan 45 is equal to length of the tree(AB) / length of the shadow(BC) tan 45=18/BC 1=18/BC Therefore BC=18 metres