Baking powder contains a mixture of baking soda and an acid, i.e., tartaric acid (A). When baking powder is heated or mixed in water, the following reaction takes place:
NaHCO3 (Baking sode) + H+ → CO2 + H2O + Sodium salt of acid
Carbon dioxide gas (B) is produced during the reaction causes cake to rise making them soft, fluffy and spongy.
Thus, A is tartaric acid.
B is carbon dioxide (CO2)