How do you find the mass of a sample of air containing 78 mol of N2, 21 mol of O2, and 1 mol of Ar

the mass in a mole is the molecular weight of the compound, in grams.

For example, the mass of a mole of carbon is 12 g because the atomic weight of carbon is 12.

So, add up all the atomic weights of your gases, multiply by how many moles, and that's your mass in grams.