The empirical formula of the compound is determined by converting the individual masses of each element to moles first. Hence for Mg, this is equal to 0.2042 moles, and oxygen is equal to 0.2 moles. We divide the number of moles to the smaller value between the two. For Mg, that is 1 as well as for oxygen. Hence the answer is MgO or magnesium oxide.