I came across this while solving some optics related question. Please have a look at the image link.
So, in the diagram, lines AO and BO lie on the XY plane. I know that $\ \angle AOX=\angle BOX=\theta$, $\angle POX=\phi$ and the angle made by the plane containing the lines PO and XO w.r.t. XY plane is $\psi$. I want to find $\angle POA$ and $\angle POB$ as a function of $\theta, \phi\ \text{and}\ \psi$. In the actual problem I am trying to solve, $\theta$ is constant but $\phi$ and $\psi$ are varying. Please help me out here.
Thank you!