Hold a gas at one temperature and let it change volume, and it traces the curve P = nRT/V. The blue line is that isotherm; the gold region under it, between V1 and V2, is the work — and the card beside it is the same area written as a logarithm. Press Free expansion instead and the curve and the shading disappear: a gas rushing into a vacuum is not in equilibrium on the way, so there is no path to draw and no area to measure, which is exactly why the work is zero. Both states are drawn against one pair of axes. The two pressures come from PV = nRT, so they are the curve restated, not a check on it.
What is happeningThe gas expands and does 1728.8 J of work on its surroundings, drawing the same 1728.8 J in as heat.