Most simply, I think, is to orient the pyramid so that the base vertices are on the x and y axes. If we then look only at Octant I, we have the tetrahedron with x- and y-intercepts at . Obviously, the z-intercept is at 9.
Three sides of the tetrahedron are the coordinate planes. The equation of the plane making the fourth side is trivial from the Intercept Form:
Solve for z:
Eliminate z and solve for y:
Now write the integral
This should be 1/4 the volume of the pyramid. Only a slight variation should produce the volume of the top point and subtraction the volume of the frustrum.
Note: I solved for z and then y. There are five (5) other ways to proceed.