The Volume of a cube is computed as follows:
V = side³
Each side is 1/4 in, then the volume is:
V = (1/4)³ = 1/64 in³
The prism is 5 cubes long, 4 cubes high and 2 cubes wide, then the number of cubes in the prism is:
5*4*2 = 40 cubes
Finally, the volume of the prism is 40*1/64 = 40/64 = 5/8 in³