Isochoric step 2→3. No volume change means no work, so
Q23=ΔU23=−20 J.
Adiabatic step 3→1. Q31=0, so
ΔU31=−W31=−(−20)=+20 J.
Isothermal step 1→2. Over a complete cycle ΔU=0:
ΔU12−20+20=0⟹ΔU12=0,
as it must be for an ideal gas at constant temperature.
Work in the isothermal step. The total work round the cycle is 10 J:
W12+W23+W31=10⟹W12+0−20=10⟹W12=30 J.
Heat added.
Q12=ΔU12+W12=0+30=30 J.
(D)