Do you mean it is heated to 400 ºK?
The condition in the flask after the heating is
T 1= 400 ºK
P1 = 1 atm
V1 = 2 L
After cooling to 300 ºK
T2 = 300 ºK
P2 = ?
V2 = 2 L
The gas law states that P*V/T = constant so P1*V1/T1 = P2*V2/T2
P2 = P1*V1/T1 * T2/V2. Since V1 = V2 P2 = P1*T2/T1
P2 = 0.75 atm
The no of moles of oxygen is, from P*V = n*R*T
n = P*V/(R*T)
for R use 0.082 L*atm/ºK-mol
n = 0.75*2/(0.082*300) = 0.061 moles
The molecular mass of O2 is 32 g/mole so the mass is 0.061*32 = 1.95 g
The condition in the flask after the heating is
T 1= 400 ºK
P1 = 1 atm
V1 = 2 L
After cooling to 300 ºK
T2 = 300 ºK
P2 = ?
V2 = 2 L
The gas law states that P*V/T = constant so P1*V1/T1 = P2*V2/T2
P2 = P1*V1/T1 * T2/V2. Since V1 = V2 P2 = P1*T2/T1
P2 = 0.75 atm
The no of moles of oxygen is, from P*V = n*R*T
n = P*V/(R*T)
for R use 0.082 L*atm/ºK-mol
n = 0.75*2/(0.082*300) = 0.061 moles
The molecular mass of O2 is 32 g/mole so the mass is 0.061*32 = 1.95 g