See attached file.
You did a) correctly except for the units for the gas constant. You should include a Joule/Kelvin in the factor 8.315. So you can write 40 Mole times ( 8.315 J/(K Mole)) = 40 *8.315 J/K
In b) what you should calculate is the work done by the gas. You wrote down the formula for work done on the gas. And then you made an error with the sign because the logarithm you wrote down is negative.
The work done by the gas is the integral of P dV from the initial state to the final state and is given by:
W = nRT Log[Vf/Vi]
When you work out ...
A detailed solution is given.