The gas that extinguishes a burning candle is carbon dioxide. It is formed by the action of dilute hydrochloric acid on a metal carbonate or metal hydrogen carbonate and produces effervescence. Since one of the compounds formed is calcium chloride, this shows that the metal compound is calcium carbonate. It cannot be calcium hydrogen carbonate because calcium hydrogen carbonate is found in solution.
Thus, the metal compound A is calcium carbonate (CaCO3). Calcium carbonate reacts with dilute hydrochloric acid to form calcium chloride, carbon dioxide and water.
CaCO3(s) + 2HCl(aq) ----> CaCl2(aq) + CO2(S) + H2O(l)