When a gas is collected over water, one must subtract the vapor pressure of water from the total pressure in order to find the pressure of the gas itself. Thus, 1.05 atm - 0.0278 atm = 1.0222 atm = pressure of the O2 gas.
PV = nRT and solve for n to determine moles of O2 collected.
n = PV/RT = (1.0222 atm)(0.5 L)/(0.0821 Latm/Kmol)(296 K) note the use of Kelvin for temperature.
n = 0.02103 moles O2
mass of O2 = 0.02103 moles x 32 g/mole = 0.67 grams (to 2 significant figures)