2 moles of an ideal gas are in a closed system with a temperature of $25\ \mathrm{^\circ C}$.
The gas is cooled under constant pressure and afterwards heated gas under constant volume.
During the cooling process the gas has lost $1000\ \mathrm J$ of heat to the environment.
It is known that the molar heat capacity of the gas is $C=25\ \mathrm{J/(^\circ C\ mol)}$
What is the work done by the system during the cooling and heating combined?
Official answer: $333\ \mathrm J$.
The problem: I understand how to get to this solution, however I don't understand why an alternative method yields an incorrect answer. Here's what I tried:
First, during the heating process there is no work done because the volume is constant.
$Q=-1000\ \mathrm J$
We know that:
$\Delta E=\frac32\cdot n\cdot R\cdot\Delta T$
Now, $Q=n\cdot C\cdot \Delta T$, therefore:
$-1000=25\times2\times\Delta T$ and therefore $\Delta T=-20$
So $\Delta E=\frac32\cdot n\cdot R\cdot\Delta T=\frac32\times2\times8.314\times(-20)=-498.84\ \mathrm J$
By the first law of thermodynamics: $\Delta E=Q+W$, therefore $-498.84=-1000+W$ and $W=501.16\ \mathrm J$
Could anyone please tell me where is my mistake?