Let h = Height of the hill
And ho= Horizontal distance of Surveyor, S from the foot of the hill.

Tan 49.7=ho40+h⟹ho=Tan49.740+h
Tan 39.3=hoh⟹ho=Tan39.3h
Tan49.740+h=Tan39.3h
40 tan 39.3+h tan 39.3=h tan 49.7
40 tan 39.3=h( tan 49.7− tan 39.3)
h=tan49.7−tan39.340tan39.3
=90.775ft