(N/A) The change in volume is given by $\Delta V = (V_f - V_i)$.
If $W$ is the work done on the system by the movement of the piston,then the work done is defined as:
$W = -p_{ext} \times \Delta V$
Substituting $\Delta V = (V_f - V_i)$,we get:
$W = -p_{ext} \times (V_f - V_i) = p_{ext} \times (V_i - V_f)$
This can be represented on a $p-V$ graph as shown in the figure. The work done is equal to the shaded area under the pressure-volume curve.
In the case of compression,the system is compressed from initial volume $V_i$ to final volume $V_f$,where $V_f < V_i$. Thus,$\Delta V$ is negative,making the work done $W$ positive,which is consistent with the sign convention that work done on the system is positive.