Total work done $W$ is given as $W = W_1 + W_2 + W_3$
Now, $W_1 = -P \Delta V = -1 \times (40-20) = -20\: L\: -atm$
$W_2 = 0$ because $ \Delta V = 0$
$W_3 = -2.303nRT \: log \large\frac{V_2}{V_1}$$ = -2.303 \times 2 \times 0.082 \times 121.95 \times log \bigg(\large\frac{20}{40} \bigg)$
$ = 13.86\: L\: -atm$
$W = W_1 + W_2 + W_3 = -20 + 0 + 13.86 = 6.13\: L\: -atm \times 101.3 = 620.96 \: J$
Ans : (D)