Without the smaller jug, the larger one contains 8 units in the position shown. The introduction of the smaller jug as shown displaces 3/4 of its own volume (3 units) leaving 5 units.