A 23.9475 g sample of impure magnesium carbonate

was heated to complete decomposition
according to the equation
MgCO3(s) → MgO(s) + CO2(g).
After the reaction was complete, the solid
residue (consisting of MgO and the original
impurities) had a mass of 18.345 g. Assuming
that only the magnesium carbonate had decomposed,
how much magnesium carbonate
was present in the original sample?
Answer in units of g.

2 answers

initial mass - final mass = CO2 mass

convert CO2 mass to moles

CO2 moles = MgCO3 moles

convert MgCO3 moles to MgCO3 mass
Thank you!!!