Hope this helps
It is converting moles to grams. The amount of reactants is always equal to the amount of products so we use the mole ratio. The number that balances each compound is the number of moles of the ratio.
When converting moles to grams, we multiply the given moles by a fraction; (the numerator being the mole ratio of the compound we want and the denomin being the mole ratio of the compound we have) and multiply it by the molar mass of the compound we want.
By substituting all the units of each compound, we are left with the grams of CaCO3.