J.R. S. answered 05/27/21
Ph.D. University Professor with 10+ years Tutoring Experience
Here is the balanced equation for the reaction taking place:
MgCO3(aq) + 2HCl(aq) ==> H2O(l) + CO2(g) + MgCl2(aq)
Take note of the phases for the products.
You have liquid water, carbon dioxide gas and magnesium chloride (MgCl2) in solution.
To get MgCl2 as a solid simply warm the sample to eliminate the CO2 gas and then further to evaporate all of the water. You will be left with MgCl2 solid.