Given that Mg(ClO3)2 decomposes into magnesium chloride and oxygen:

A) Write a balanced equation for this reaction.
I got Mg(ClO3)2 yields MgCl2 + 3 O2
Is that right?

B) If 0.302 grams of O2 is lost from 1.890 grams of a mixture of Mg(ClO3)2 and an inert material, what is the percentage of Mg(ClO3)2 in the mixture?
Please help! I'm lost.