`n=2`,`A=4xx10^-3m^2`, monoatomic gas,
Let as some instant, spring is compressed by `x` force in spring: `kx`
pressure exerted by spring `P=(kx)/(A)`
Pressure exerted by gas `=P_0+(kx)/(A)`,`P_0`: atm pressure
`dW=PdW=(P_0+(kx)/(A))Adx`
`W=int_(0)^(x0)(P_0+(kx)/(A))Adx`
`=P_(A)x_0+(1)/(2)kx_0^2`
`=10^5xx4xx10^-3xx0.1+(1)/(2)k(0.1)^2`
`50=40+(0.01)/(2)k`
`k=2000(N)/(m)`
`DeltaU=nC_VDeltaT=2xx(3R)/(2)xx50`
`=150xx8.3=1245J`
`DeltaQ=DeltaU+DeltaW=1245+50`
`=1295J`