Apparently we do something like this:
$z=2$, so $x^2 + y^2 + z^2 = 9$ tells us that $x^2+y^2=5$, and so our integral is: $$\int_{-\sqrt{5}}^{5}\int_{-\sqrt{5-x^2}}^{\sqrt{5-x^2}}\int_2^{\sqrt{9-x^2-y^2}} 1\,dz\,dy\,dx$$
That solution makes very little sense to me. Why do we substitute the formula for the plane $z=2$ into the formula for the sphere? What exactly does that accomplish? The innermost integral makes sense, but the limits on the first two do not.
Shouldn't the outer two integrals simply be something like $$\int_0^3\int_{-\sqrt{9-x^2}}^\sqrt{9-x^2}$$ since the radius of the sphere is $3?$ Any help is appreciated.
When you are doing these problems, the hardest part is parametrizing the domain. Looking at the solution without any explanation can be frustrating because these problems definitely have steps.
First you need to decide on an order of integration. That's right, this is a choice. The person who wrote your solution decided on the order $dzdydx$ so let's stick with that. We will work from the outside in to determine the limits of integration. I prefer to think about it like we are slicing with planes. We want to cut the volume with a plane $x=\text{constant}$, so we need to determine the bounds on $x$. To see these bounds you need to think about the picture that I've attached. The plane $z=2$ meets the sphere in some circle. So, clearly, the radius of this circle determines where we are allowed to slice with an $x-$plane.
The algebraic way to understand "the sphere meets the plane" is to plug $z=2$, the equation for the plane, into the equation for the sphere. This results in $x^2+y^2=5$. So the extreme values for $x$ are $-\sqrt{5}$ to $\sqrt{5}$.
Now slice the volume with some $x-$value. Don't actually pick one, but imagine we chose one at random in the range we've determined for $x$. This is what it looks like after you slice.
But now we need to slice this 2-dimensional shape with $y$. What are the bounds on $y$ in terms of the already chosen $x$? This is given by solving for $y$ in the equation we found above. When we slice with this $y$, we are only left with a vertical segment running from the plane to the sphere. Thus $z$ ranges from $2$ to $z=\sqrt{9-x^2-y^2}$.