Your result seems to be - accidentally - correct, even if the mass you have used (34.01 g) doesn't make any sense. Trick is, it cancels out.

Imagine you have a 100g sample of the substance. Obviously it contains 17g of oxygen, 50g of helium and 33g of nitrogen. Convert to moles - and you are ready to calculate molar fractions.

Imagine you have a 1000g sample of the substance. Obviously it contains 170g of oxygen, 500g of helium and 330g of nitrogen. Convert to moles - and you are ready to calculate molar fractions.

Imagine you have ANY sample of the substance. Obviously you can calculate how much oxygen, helium and nitrogen it contains. Convert to moles - and you are ready to calculate molar fractions.

Say you have sample of mass m.

Molar fraction of oxygen is

- do you see that m cancels out?