Work done by an expanding gas, how to solve this particular example?
You have system where 1 mole of solid (0 moles of gas) decomposes into two moles of gas at a constant temperature (given) and likely a constant pressure (not given). 

Your formula for work is not correct for this problem. You cannot have $n$ outside of the integral since $n$ is not constant. 

Let's write the total differential of the ideal gas equation:

$$\begin{align}
\mathrm{d}(PV)&amp;=\mathrm{d}(nRT) \\
P\mathrm{d}V + V\mathrm{d}P &amp;= nR\mathrm{d}T + RT\mathrm{d}n
\end{align}$$

Since $T$ is constant and $P$ is constant, we know $\mathrm{d}T=0$ and $\mathrm{d}P=0$, so this simplifies to:

$$P\mathrm{d}V = RT\mathrm{d}n$$

Can you do something with this relationship that avoids integrating with respect to (unknown) volumes?