a)
$CaCO_3 \xrightarrow{t^o} CaO + CO_2$
$CaO + H_2O \to Ca(OH)_2$
$Ca(OH)_2 + 2HCl \to CaCl_2 + 2H_2O$
$CaCl_2 + 2AgNO_3 \to Ca(NO_3)_2 + 2AgCl$
b)
$2Mg + O_2 \xrightarrow{t^o} 2MgO$
$MgO + 2HCl \to MgCl_2 + H_2O$
$MgCl_2 + 2KOH \to Mg(OH)_2 + 2KCl$
$Mg(OH)_2 + H_2SO_4 \to MgSO_4 + 2H_2O$