Answer
(a) $W_{net} = (p_1 - p_2 ) (V_2 - V_1)$
(b) $W_{net} = - (p_1 - p_2 ) (V_2 - V_1)$
Work Step by Step
(a) When P is constant, $W = p\Delta V$
So the total W for the whole system is
$W_{13} + W_{32} + W_{24} + W_{41} $
Where
$W_{13} = p_1(V_2 −V_1)$
$ W_{32} = 0 $
$W_{24} = p_2(V_1 −V_2) $
$W_{41} = 0 $
$W_{13} + W_{32} + W_{24} + W_{41} $
$W_{net} = p_1(V_2 −V_1) + p_2(V_1 −V_2) $
$W_{net} = p_1V_2 −P_1V_1 + p_2V_1 −p_2V_2 $
$W_{net} = (p_1 - p_2 ) (V_2 - V_1)$
If we observe, $W_{net} $ is the same as the area under the graph, in the closed loops.
(b)For reverse process, the pressures are the same, but the volume changes are all the negatives of those found in part (a), so the total work is negative of the work found in part (a).
$W_{net} = - (p_1 - p_2 ) (V_2 - V_1)$