Two different masses m and 3 m of an ideal gas are heated separately in a vessel of constant volume