Answer
a) $\rho=3$
b) $\rho ^2 (\sin^2 \phi \cos 2 \theta- \cos^2 \phi)=1$
Work Step by Step
Conversion of rectangular to spherical coordinates is as follows:
$x=\rho \sin \phi \cos \theta; y=\rho \sin \phi \sin \theta;z=\rho \cos \phi$
and
$\rho=\sqrt {x^2+y^2+z^2}$;
$\cos \phi =\dfrac{z}{\rho}$; $\cos \theta=\dfrac{x}{\rho \sin \phi}$
a) Here, $x^2+y^2+z^2=9$
This implies that
$\rho^2=3^2$
Thus, $\rho=3$
b) Here, $x^2-y^2-z^2=1$
This implies that
$(\rho \sin \phi \cos \theta)^2-(\rho \sin \phi \sin \theta)^2-(\rho \cos \phi)^2=1$
or, $\rho ^2 \sin^2 \phi (\cos^2 \theta- \sin^2 \theta)-(\rho \cos \phi)^2=1$
Hence, $\rho ^2 (\sin^2 \phi \cos 2 \theta- \cos^2 \phi)=1$