Chemical Concepts Demonstrated: Solubility of gases in water, pH changes in water with gas dissolved in it
The water rushes up to the top flask and the solution turns pink.
The first few drops of water that enter the upper flask absorb a little ammonia gas. When this occurs, a slight vacuum that forms sucks a little more water into the flask to balance the pressure. This water, in turn, absorbs a little more ammonia. This continuous exchange creates a chain reaction that causes the solution to come rushing into the top flask.
The solution turns pink because of the basic activation of the indicator in the water.
As an alternative, HCl gas could be used (bromothymol blue or methyl violet replace the phenolphthalein). SO2 and Cl2 gases could also be used to create acidic solutions.