I am trying to compute the inverse of
$$f(\theta,\phi) = \left(\frac{\cos\theta \sin\phi}{1-\cos\phi}, \frac{\sin\theta \sin\phi}{1-\cos\phi}\right)$$ but I lack some basic knowledge on how I can do that. Could please provide some guidance?
Thank you in advance.
Edit:
Following @peek-a-boo's comment (and M. Strochyk's answer), I have tried the following. For
$$f:\quad (\Theta,\Phi) \to (X,Y),\qquad (\theta,\phi)\mapsto (x,y):=\left(\frac{\cos\theta \sin\phi}{1-\cos\phi}, \frac{\sin\theta \sin\phi}{1-\cos\phi}\right),$$ and setting $$x = \frac{\cos \theta \sin \phi}{1 - \cos \phi},$$ and $$y = \frac{\sin \theta \sin \phi}{1 - \cos\phi},$$ we have
$$x^2+y^2 = \frac{1 +\cos \phi}{1 - \cos \phi},$$ and
$$\frac{y^2}{x^2} = \frac{\sin^2 \theta}{\cos^2 \theta}.$$
Combining the last two equations we obtain
$$x = \left|\cos \theta \right| \sqrt{\frac{1+\cos \theta}{1-\cos \theta}} ,$$ and
$$y = \left|\sin \theta \right| \sqrt{\frac{1+\cos \theta}{1-\cos \theta}},$$ which finally leads
$$f^{-1}:\quad(x,y)\mapsto (\theta,\phi) = \sqrt{\frac{1+\cos \theta}{1-\cos \theta}}\left(\left|\cos \theta \right| , \left|\sin \theta \right|\right)$$
Let $f(\phi,\theta)=(x,y)$.
Then
$$\frac yx=\tan\theta$$ gives you $\theta$ (on the four quadrants). Next
$$\frac{\sin\phi}{1-\cos\phi}=\frac{2\sin\frac\phi2\cos\frac\phi2}{2\sin^2\frac\phi2}=\cot\frac\phi2=x\cos\theta+y\sin\theta.$$
gives you $\phi$.