Answer:
Because their Molar masses or their densities are almost the same.
Step-by-step explanation:
Average molecular mass of the air is 28.97 g/mol.
Molar mass of nitrogen gas (N2) ≈ 2*14.01 = 28.02 g/mol
As we can see that these molar masses is to close.
To collect gas over the air, the gas should be very light, that means that its molar mass should be much less than molar mass of the air.