Answer
(a)$ 598 J$
(b)$ 2500J$ Heat flows into gas.
Work Step by Step
(a) We know that
$W_{BC}=-P(V_C-V_B)$
$\implies W_{BC}=-250KPa(1L-5L)=1KJ$
$W_{CA}=-nRT\ln \frac{V_A}{V_C}=-P_AV_A\ln \frac{V_A}{V_C}=-50\times 5\ln \frac{5}{1}=-402$
$W_{cycle}=1000J-402J=598J$
(b) As $Q_{AB}=\frac{5R}{2}(\frac{P_BV_B}{R}-\frac{P_A V_A}{R})$
$Q_{AB}=\frac{5}{2}(250KPa\times 5L-50KPa\times 5L)=2500J$
Thus, heat flows into gas.