When pressure, volume, and temperature all change, the ideal-gas ratio pV over T stays constant.

highlighted = computed this step

Compute the first gas ratio

The first state uses pressure 2, volume 6, and temperature 300 kelvin.

piViTi=2 Pa6 m3300 K\frac{p_iV_i}{T_i} = \frac{2\ \text{Pa}\cdot 6\ \text{m}^{3}}{300\ \text{K}}
Combined gas comparisonBoth piston states share one volume scale.6 m^32 Pa 300 Kbefore4 m^34 Pa 400 Kafter

Compute the second gas ratio

The second state uses pressure 4, volume 4, and temperature 400 kelvin.

pfVfTf=4 Pa4 m3400 K\frac{p_fV_f}{T_f} = \frac{4\ \text{Pa}\cdot 4\ \text{m}^{3}}{400\ \text{K}}

The combined ratio matches

Both states give one twenty fifth joule per kelvin.

pVT=125 J/K\frac{pV}{T} = \tfrac{1}{25}\ \text{J/K}
Combined gas comparisonBoth piston states share one volume scale.6 m^32 Pa 300 Kbefore4 m^34 Pa 400 Kafter