I think there's some error in the quest.
Consider a pole whose upper half (3l/4) subtends an angle θ and the lower half (l/4) subtends an angle α .
so you get the equations tan(α+θ) = l/40
and tan α = l/160
and you have been given that tan θ = 3/5
solving these you get a quadratic in l which gives you the answer.
The error is that the anser is coming -40 m . and -ve length is impossible.
By the way can u plzz provide the source ?