Let's assume that O₂ is an ideal gas.
We can use combined gas law,
PV/T = k (constant)
Where, P is the pressure of the gas, V is volume of the gas and T is the temperature of the gas in Kelvin.
For two situations, we can use that as,
P₁V₁/T₁= P₂V₂/T₂
P₁ = 795 mm Hg
V₁ = 642 mL
T₁ = (273 + 23.5) K = 296.5 K
P₂ = ?
V₂ = 957 mL
T₂ = (273 + 31.7) K = 304.7 K
By applying the formula,
795 mm Hg x 642 mL / 296.5 K = P₂ x 957 mL / 304.7 K
P₂ = 548.07 mm Hg
P₂ = 548 mm Hg
760 mmHg = 1 atm
548 mm Hg = 1 atm x (548 mmHg / 760 mmHg) = 0.721 atm
Pressure of gas = 548 mm Hg = 0.721 atm