I have a gaseous mixture of $\ce{H2}$ and $\ce{CO2}$ which contains $66\%$ by mass of $\ce{CO2}$. I have to figure out the vapour density of the mixture (defined as mass of a certain volume of a substance divided by mass of same volume of hydrogen).
My approach: let's assume $\pu{100 g}$ of mixture contains $\pu{66 g}$ of $\ce{CO2}$ and $\pu{34 g}$ of $\ce{H2}$. Hence, the amount of substance of $\ce{CO2} = \pu{1.5 mol}$ and the amount of substance of $\ce{H2} = \pu{17 mol}$. The total amount of substance $= \pu{18.5 mol}$.
The mass of $\pu{1 mol}$ of mixture is 5.4 g (mass of 18.5 mol is 100 g), and the vapour density $\text{VD} = 2.7$.
I got my answer right, but now I am doubtful of my approach. Was it safe to assume that the amount of substance of mixture equals that of the amount of substance of both the gases?