Answer
(a) $\theta=tan^{-1}(\frac{40x}{x^2+159600})$
(b) $x=399.5ft$
Work Step by Step
(a) There are two triangles of concern, one with a height of 380ft, another with a height of 380+40=420ft, both have a horizontal distance of $x$. In the first triangle $tanA=\frac{380}{x}$ where $\angle A$ is the elevation.
In the second triangle, $tanB=\frac{420}{x}$ where $\angle A$ is the elevation. For angle $\theta=B-A$ we have
$tan\theta=tan(B-A)=\frac{tanB-tanA}{1+tanBtanA}=\frac{420/x-380/x}{1+420\times380/x^2}
=\frac{40x}{x^2+159600}$, thus we have $\theta=tan^{-1}(\frac{40x}{x^2+159600})$
(b) Graph the above function as shown, it can be found that a maximum of 0.05rad can be found at $x=399.5ft$