keeping in mind that a cube is just a rectangular prism with all equal sides, so if a side is say "s" units long, the volume of the cube is just s*s*s, or s³.
we know this cubes have a side of 12, thus each one has a volume of 12³, and since we know there are 96 of them, their total volume will just be 96 * 12³, and that'd be the volume of the prism with them.