According to the meaning of the question, triangle ABC is a right triangle, where angle A is a right angle and angle C = 30. So the tree height AB= 12/√3.
When AB counts in the direction of the sun's rays, when AB and BC are at right angles, AC is the longest, and the angle A is still 30. AC=2AB=24/√3