Since the product of your reaction should be pure magnesium oxide (containing magnesium and oxygen), and the initial material taken was pure elemental magnesium, the mass of oxygen reacted should just be the difference in these two masses. Using the data above, the mass of oxygen that reacted with the sample of magnesium would be:

Mass oxygen = mass magnesium oxide - mass magnesium

= 0.5667 g - 0.3397 g = 0.2270 g