Height of boy 1.5m
Height of temple from ground 30m
Height of temple from boys vision= 30-1.5=28.5 m
Let distance between boy and temple be x.
using trigonometry we have tan 30°=28.5/x
when the angle of elevation is 60° boy has walked distance =y
we have tan60 = 28.5/(49.26-y)
⇒ √3 = 28.5/(49.26-y)
He has walked 32.81m toward temple.