We see that the dimensions of the box are 8 inches * 2 inches * 6 inches. All the three sides are multiples of 2. So it is possible to fill the entire volume of the box with 2-inch cubes without leaving any space unoccupied.
To determine the number of cubes that can be placed we need to find the volume of the box which is
8*2*6 = 96 inch^3
The volume of one cube is 2*2*2 = 8 inch^3
The number of cubes that can be placed is 96/8 = 12.