The balanced reaction is:
2Mg + O2 = 2MgO
We are given the amount of magnesium to be reacted with O2. This will be the starting point of the calculations.
4.00 g C3H8 ( 1 mol Mg/ 24.31 g Mg ) ( 1 mol O2 / 2 mol Mg ) ( 32.0 g O2 / 1 mol O2 ) = 2.63 g O2