You know that 1 mol of a gas occupies 22.4 L at 1 atm and 0 °C.
If that gas is air, 78 % of its volume (17.5 L) is "N"_2, and 22 % of its volume (4.9 L) is "O"_2.
The molar mass of "N"_2 is 28.0 g/mol.
If the mass of 22.4 L of "N"_2 is 28.0 g, the mass of 17.5 L of "N"_2 is
17.5 color(red)(cancel(color(black)("L N"_2))) × ("28.0 g N"_2)/(22.4 color(red)(cancel(color(black)("L N"_2)))) = "21.9 g N"_2
The molar mass of "O"_2 is 32.0 g/mol.
If the mass of 22.4 L of "O"_2 is 32.0 g, the mass of 4.9 L of "O"_2 is
4.9 color(red)(cancel(color(black)("L O"_2))) × ("32.0 g O"_2)/(22.4 color(red)(cancel(color(black)("L O"_2)))) = "7.0 g O"_2
The total mass of the two gases in 22.4 L is
m_"N₂" + m_"O₂" = "21.9 g + 7.0 g" = "28.9 g"
∴ The molar mass of dry air is 28.9 g/mol.