Rate at which gases travel are inversely proportional to their molecular mass,
More the molecular mass, less will be its rate of diffusion.
molar mass of HCl = 36.5g
mole mass of NH₃ = 17g
Since NH₃ has lower molecular mass, it will travel faster. The distance travelled by it will also be higher than that of HCl.