Metal compound A reacts with dilute hydrochloric acid to produce Calcium Chloride, the gas evolved CO2 with brisk effervescence. Hence, metal A should be Calcium Carbonate.
Hence, the reaction between Calcium Carbonate and HCl is
CaCO3 (s) + 2HCl (Aq) → CaCl2( Aq) + CO2 (g) + H2O (l)