Numerical answer type, answer in J, tolerance 1.
Answer: 1330 J
Per mole, along PVx=const the work done by the gas for a temperature change ΔT is wby=−RΔT/(x−1), so q=CVΔT+wby=(CV+R/(1−x))ΔT. With x=3: C=2.5R−0.5R=2R=16.628 Jmol−1K−1. q=2×16.628×40=1330 J.