See the figure
The valves of X and Y are opened simultaneously. The white fumes of NH4CI will first form at
Rate of diffusion of NH3 (molar mass = 17) is larger than that of HCI (molar mass of HCI = 36.5), hence NH3 covers more distance than HCI. NH3 and HCI react to form white fumes of NH4CI.