Answer
a) $\rho=3$
b) $\rho ^2 (\sin^2 \phi \cos 2 \theta- \cos^2 \phi)=1$
Work Step by Step
The conversion of rectangular coordinates to spherical coordinates is given as:
$x=\rho \sin \phi \cos \theta; y=\rho \sin \phi \sin \theta;z=\rho \cos \phi$
Here, $\rho=\sqrt {x^2+y^2+z^2}$; $\phi =\cos^{-1} [\dfrac{z}{\rho}]; \theta=\cos^{-1}[\dfrac{x}{\rho \sin \phi}]$
a) Here, we have $x^2+y^2+z^2=9$
But $\rho=\sqrt {x^2+y^2+z^2}$
This gives: $\rho^2=3^2 \implies \rho=3$
b) Here, we have $x^2-y^2-z^2=1$
But $x=\rho \sin \phi \cos \theta; y=\rho \sin \phi \sin \theta;z=\rho \cos \phi$
So, we have $(\rho \sin \phi \cos \theta)^2-(\rho \sin \phi \sin \theta)^2-(\rho \cos \phi)^2=1$
or, $\rho ^2 \sin^2 \phi \times (\cos^2 \theta- \sin^2 \theta)-(\rho \cos \phi)^2=1$
Thus, we get $\rho ^2 (\sin^2 \phi \cos 2 \theta- \cos^2 \phi)=1$