The initial volume of the gas is (keeping in mind that

):

The work done by the external force on the gas is

where p is the pressure and

the final volume. Re-arranging this equation, we can find the final volume Vf:

and this value makes sense, because it is less than the initial volume of the gas, in fact the problem says that the external force compresses the gas.