Explanation:
1/2 yd means that 2 of them fit into 1 yard.
so, 1 1/2 yd = 3/2 yd, so 3 cubes fit there.
the length has 3 cubes. the width has 3 cubes.
2 1/2 yd = 5/2 yd, so 5 cubes for there.
the height has 5 cubes.
and so, the volume is 3×3×5 = 45 half-yard cubes.
that means the volume is
45 × 1/2 × 1/2 × 1/2 yd³ = 45/8 yd³ = 5 5/8 yd³.
the easiest way to see this is that the volume is directly
3/2 × 3/2 × 5/2 yd³.