a). Wbc=0 and Wda=0 as dV=0 at those intervals.
Wab=Pa(Vb-Va)=(5 atm)(0.8 m3-0.4 m3)=2.02*105 J
1 atm=1.01*105 N/m2 1 J=(1 N)*(1 m)
Wcd=( 2 atm)(0.4 m3 -0.8 m3)= - 0.808*105 J
Then Wabcd= (2.02-0.808)*105 J =1.212*105 J That is, work Wabcd is positive and the work has done on the system.
b) To answer the question we need to make an assumption. Let’s consider the system as a closed one. Then by using the first Law of thermodynamics Wabcd=Q >0, that is, the heat flows in the system.