This can be verified if we know the values of the initial (T1) and final (T2) temperatures. We use the ideal gas equation for this: PV=RT.
P1V1=RT1
(40000 Pa)*(0.002 m^3) = (8.314 m3Pa/molK)(T1)
T1 = 9.62 K
P2V2=RT2
(40000 Pa)*(0.008 m^3) = (8.314 m3Pa/molK)(T2)
T2 = 33.5 K
Thus, this is true if the monoatomic ideal gas is heated from 9.62 K to 33.5 K at constant pressure.