Volumes from the gas law. At constant pressure Patm:
VA=PatmnRTA=1,013⋅10510⋅8,31⋅300=0,246 m3
VB=PatmnRTB=1,013⋅10510⋅8,31⋅320=0,263 m3
ΔVgas=VB−VA=0,017 m3
Work of the atmosphere. The gas expands, so the atmosphere is compressed: ΔVatm=−ΔVgas=−0,017 m3.
Latm=PatmΔVatm=1,013⋅105⋅(−0,017)=−1728 J
First law. The gas itself has no moving walls of its own (Lgas=0 in our convention), and ΔEint=25nRΔT:
ΔEint=25⋅10⋅8,31⋅20=4155 J
With ΔEint=Q+Latm:
4155=Q−1728 ⇒ Q=4155+1728=5883 J
Q≈5883 J
More heat is needed than at constant volume: part increases the internal energy, part pushes the atmosphere away.