the empirical formula of this compound

A 25.0 gram sample of a compound made up of magnesium carbon and oxygen contains 7.20 grams magnesium and 3.55 grams carbon. a) Find the empirical formula of this compound. b) Find the mass percentage of each element in this compound. c) What is the mass of magnesium in a 13.9 gram sample of this compound? d) What is the mass of this compound that contains 0.290 moles of carbon?