Volume is Cross sectional area x length, since that’s a cuboid, the cross sectional area( the 2D shape u would get if u slices that shape in the middle) is a square,
Area of the square is 3.1x 3.1 =9.61
Now that you have found Cross Sectional Area(9.61), multiply it by the length which is 3.1