W 1 is negative work and Q 1 is positive (endothermic).
△ u = w1+q1=120, and the internal energy can be increased by 120J. ..
When the gas returns from state b to state a through process II,
W2 is active work; △U′= W2+Q2 =- 120j
Q2=-320J, giving off heat.
So the answer is: the heat released by the gas in this process is 320 J.