The gas expands isothermally on the right of the barrier (but possibly at a different
constant temperature) against the pressure pf provided by the downstream gas acting
as a piston to be driven out. The volume changes from 0 to Vf, so the work done
on the gas in this stage is