A uniform solid body is constructed using a square-based pyramid mounted on a cube. If each edge of the solid has length $l$ show that the centre of gravity of the body lies within the cube is, $\frac {11l}{(24 + 4√2)}$from the base of the pyramid.
Now workings so far. This is equating centre of mass with centre of gravity as the object is small compared to the earth.
Volume of cube = $l^3$, and of the pyramid = $\frac{√2l^3}{6}$, using the height of the pyramid as $\frac{l}{√2}$, from Pythagoras. If $O$ is at the base of the pyramid we can say that for the pyramid the height above $O$ is $\frac{l}{4√2}$, as the centre of gravity (centre of mass) is $\frac{h}{4}$ above the base, and we are expecting the centre of gravity to be in the cube. The height below the base for the cube is $\frac{-l}{2}$.
Would it be better to have $O$ at the base of the cube? Is the centre of gravity for a pyramid 'always' $\frac{h}{4}$ from its base?