In the chemical reaction:
\[ \text{CaCO}_3 \rightarrow \text{CO}_2 + \text{CaO} \]
the mass of the reactants equals the mass of the products, according to the law of conservation of mass.
You start with 30 grams of calcium carbonate (CaCO3). When it decomposes, it will produce carbon dioxide (CO2) and calcium oxide (CaO), but the total mass of these products will also be 30 grams.
Therefore, the total mass of the products is 30 grams.