Look at the hand-drawn diagram below.
The diagram on the left is the shape which we are integrating. You can see the sphere of radius 13 outside. And a red cyclinder of radius 12 inside. The blue line is the line drawn from the origin to the place where the cylinder and sphere meet. The angle is the angle made by the z-axis and the blue line. Using some trigonometry (on the triangle formed by the black,red, and blue lines) we find that .
The diagram to the right is the picture of the region over which we are integrating. The red line is the graph of the line and the angle is the angle between the x-axis and the red line (graph). Which is .
In spherical coordinate we know that and .