I was trying to answer a question someone posed about determining polar coordinates from the camera viewpoint from a photograph of the corner of a cube whose edges correspond to the $x,y,z$ axes. This involves transforming the angles between the axes from the photograph into the true angles via the viewing angle.
I came up with the equation: $$\tan^{-1}(\cos(x)\tan(A))+\tan^{-1}(\cos(x)\tan(B)) = 90$$ where $A$ and $B$ are the measured angles from the photo and $x$ is the z polar coordinate. Does anyone have a simpler way to solve for $x$ other than guess and check?
Taking the tangent leads you to
$$1-\cos^2x\tan A\tan B=0$$
or
$$x=\arccos\sqrt{\cot A\cot B}.$$