Let the equation of the sphere be $x^2 + y^2 + z^2 =a^2$. Using cylindrical polar coordinate

$x = rcos \theta, y = rsin \theta, z = z$

we see that in the first octant z varies from z = 0 to $z = \sqrt{a^2 - (x^2+y^2)} = \sqrt{a^2 - r^2}$ r varies from r = b to r = a and $\theta$ varies from $\theta =0$ to $\theta = \pi/2$

$V = 8 \int_{\theta = 0}^{\pi/2} \int_{r = b}^a\int_{z = 0}^{\sqrt{a^2-r^2}} r \hspace{0.1cm}dr \hspace{0.1cm}d\theta\hspace{0.1cm} dz\\ \hspace{0.2cm}= 8 \int_{\theta=0}^{\pi/2}\int_{r = b}^a[z]_a^{\sqrt{a^2-r^2}}r \hspace{0.1cm}dr\hspace{0.1cm}d\theta\\ \hspace{0.1cm}= 8\int_{\theta = 0}^{\pi/2}\int_{r=b}^a\sqrt{a^2-r^2}. r \hspace{0.1cm}dr\hspace{0.1cm}d \theta\\ \hspace{0.1cm}=8\int_{\theta=0}^{\pi/2}\Big[\frac{(a^2-r^2)^{3/2}}{3/2}\times \big(\frac{-1}{2}\big)\Big]_b^ad\theta \hspace{1cm} \text{Put} \hspace{0.1cm}a^2 - r^2 = t\\ \hspace{0.1cm}= \frac{-8}{3}\int^{\pi/2}_0-(a^2-b^2)d\theta\\ \hspace{0.1cm}= \frac{8}{3}(a^2-b^2)(\theta)_0^{\pi/2}\\ \hspace{0.1cm} = \frac{4}{3}(a^2-b^2)$