During the chemical reaction, the evolved gas extinguishes a burning candle which means the gas is carbon dioxide.
Since, one of the compounds formed during this reaction is calcium chloride and carbon dioxide is formed when dilute hydrochloric acid reacts with a metal carbonate (or metal hydrogen carbonate) producing effervescence it means the metal compound is calcium carbonate (It cannot be calcium hydrogen carbonate because calcium hydrogen carbonate is found only in solution, it is also unstable to exist as a solid). Hence, the compound A is calcium carbonate.
The chemical reaction is written as follows: