The first law of thermodynamics gives us the relation:
δq=ΔU+w
δq=∫nCdT where C is the specific heat capacity for the process and n is the no of moles of the ideal gas.
Here, the process is a constant pressure process, hence C=Cp
And the change in internal energy for an ideal gas is given by ∫nCvdT.
i.e.
∫nCpdT=∫nCvdT+w
∫n(Cp−Cv)dT=w ; Cp−Cv=R for an ideal; R (universal gas constant)
i.e. w=∫nRdT=nR(T2−T1)=0.2×8.314×(300−200)=0.2×8.314×100=166J