The 3D angle between two 3D vectors is $$\beta = \arccos\Big(\frac{\textbf{r}\cdot \textbf{r}_0}{|\textbf{r}||\textbf{r}_0|}\Big)$$, is there a way to get the 2D angles between the vector $\textbf{r}-\textbf{r}_0$? and the x-axis to get $\theta$ and the z-axis to get $\phi$?
Introducing the motivation of the problem, I need to integrate the following:
$$\int_0^{2\pi}\int_0^{\pi} \frac{\sin\phi}{|\textbf{r}-\textbf{r}_0|} d\phi d\theta$$
where $\theta$ is the azimuthal angle, and $\phi$ is the polar angle (from the z-axis) and we're in spherical coordinates; expanding the vector form into its vector form is $|\textbf{r}-\textbf{r}_0|^2 = (\textbf{r}-\textbf{r}_0)\cdot (\textbf{r}-\textbf{r}_0) = r^2 + r_0^2 - 2rr_0\cos\beta$. I need the $\theta$ and $\phi$ parts, I cannot just integrate $\beta$. Is there a formula that relates the 2D angles $\theta$ and $\phi$, and the 3D angle $\beta$ so that this integrand can now be integrable?
So I found the answer HERE
and I tested this formula out to verify it in Geogebra for some 2 vectors in 3D space and it works.
You can see that the distance $|\textbf{r}-\textbf{r}_0|$ computed in $b = \sqrt{|\textbf{r}|^2+\textbf{r}_0^2-2\textbf{r}\textbf{r}_0\cos\beta}$ is the same as that in distance d which uses: $$\cos\beta = \sin\phi\sin\phi_0\cos(\theta - \theta_0) +\cos\phi\cos\phi_0$$

