(a) The fizzing is carbon dioxide, from the hydrogencarbonate reacting with an acid:
sodium hydrogencarbonate + acid → sodium salt + water + carbon dioxide
- In water, the only acid present is the tablet's own solid acid. Once that is used up the fizzing stops, and any sodium hydrogencarbonate left over simply stays dissolved.
- In dilute hydrochloric acid, the tablet's own acid reacts as before, and then the leftover sodium hydrogencarbonate reacts with the hydrochloric acid too, giving extra carbon dioxide:
NaHCO3(aq)+HCl(aq)→NaCl(aq)+H2O(l)+CO2(g)
The extra gas could only come from sodium hydrogencarbonate that the tablet's own acid did not use up. So the tablet contains more sodium hydrogencarbonate than its solid acid can react with: there is hydrogencarbonate to spare for the stomach acid.
(b) It is a fair question, and the answer is that the tablet's own acid never reaches his stomach as acid. It is used up in the glass.
The tablet is dry, so nothing happens while it sits in the packet. Dropped into water, the solid acid and the sodium hydrogencarbonate both dissolve and immediately react with each other — that reaction is the fizzing, and the carbon dioxide it releases helps the tablet break up quickly and makes the drink pleasant to swallow.
Part (a) showed that the tablet contains more hydrogencarbonate than acid, and it must, to work as an antacid: if the acid were in excess, the drink would itself be acidic. So when the fizzing stops, every bit of the tablet's acid has been consumed, and what is left dissolved in the glass is the leftover hydrogencarbonate together with the salt formed — both of which are basic. That is what he drinks, and that is what neutralises the acid in his stomach.