Consider the object at right as two separate pieces and find the dimensions of each object to calculate the volumes.
The smaller object has the same width as the larger object and its length is the remaining portion out of the opposite side's length, 15 mm.
The dimensions of the larger object is given as 15mm × 7mm × 5mm
Volume of a prism = (area of base)(height)
Add the volumes of the two pieces to get the total volume of the prism above.