Please see the work below.
Work Step by Step
We know that when water is introduced into flask, HCl gas is dissolved in water. HCl now occupies less volume in dissolved for. Thus, the pressure inside gets reduced due to which a vacuum is created which pulls the water from the long tubing.