Basically, find the Volume of the rectangular prism and then find the volume of each of the cubes. Then divide the volume of the prism by the volume of one of the cubes. This will tell you how many cubes can be fitted into the prism:
V of RP = 20*2*(3+1/4) = 130 inches cubed
V of Cube = (1/4)^3 = 1/64
130/(1/64) = 8320
8320 cubes are needed to fill the rectangular prism.