$2 \rightarrow 3 \Rightarrow \text { Isochoric process }$
$3 \rightarrow 1 \Rightarrow \text { Isothermal process }$
$W = W _{1 \rightarrow 2}+ W _{2 \rightarrow 3}+ W _{3 \rightarrow 1}$
$=\left(- P \left( V _2- V _1\right)+0\left[- P _1 V _1 \ln \left(\frac{ V _2}{ V _1}\right)\right]\right)$
$=\left[-1 \times(40-20)+0+\left[-1 \times 20 \ln \left(\frac{20}{40}\right)\right]\right]$
$=-20+20 \ln 2$
$=-20+20 \times 2.3 \times 0.3$
$=-6.2 \text { bar } L$
$| W |=6.2 \text { bar } 1=620\,J$