The gas thus formed is an effervescent carbon dioxide gas when calcium carbonate reacts with hydrochloric acid. The carbon dioxide gas also acts as an extinguisher for fires. Hence, the burning candle is extinguished. The metal compound A, therefore, constitutes calcium carbonate.
Hence metal compound A is CaCO3
The Gas evolved is CO2
The balanced equation of the reaction is
CaCO3 + 2HCl → CaCl2 + CO2 + H2O