Solution:
Concept: Stoichiometry: the coefficients of a balanced equation give the ratio of moles in which substances react and form. So we change the given quantity to moles (mass ÷ molar mass, or volume at S.T.P. ÷ 22.4 L), use the mole ratio, and change back to mass (moles × molar mass) or volume (moles × 22.4 L at S.T.P.). A gas volume must first be changed to S.T.P.; at constant (normal) pressure, Charles's law gives VSTP=V×T273.
Step 1 — Read the mole ratio.
From the balanced equation:
CaCO3+2HCl→CaCl2+H2O+CO2
So CaCO₃ : HCl : CO₂ = 1 : 2 : 1 by moles.
Step 2 — Change the volume to S.T.P.
The gas was collected at 27 °C, which is 273 + 27 = 300 K, and normal pressure.
VSTP=2×300273 L=1.82 L
Step 3 — Find the moles of CO₂.
We divide by the molar volume, 22.4 L.
moles of CO2=22.41.82=0.08125
Step 4 — (a) Mass of calcium carbonate.
The ratio is 1 : 1, and CaCO₃ = 100 g per mole.
mass of CaCO3=0.08125×100 g=8.125 g
Step 5 — (b) Mass of hydrochloric acid.
Two moles of HCl (36.5 g each) are needed per mole of CO₂.
mass of HCl=2×0.08125×36.5 g=5.93 g

Watch out: The gas was at 27 °C, not at S.T.P., so 2 ÷ 22.4 would be wrong; convert the volume first.
Therefore, (a) 8.125 g of calcium carbonate and (b) 5.93 g of hydrogen chloride are required.