It was similar because they both arranged the elements in order of increasing atomic mass.
The balanced equation will tell you that.
C4H10 + O2 ===> CO2 + H2O
C4H10 + 6.5 O2 ===> 4CO2 + 5H2O
The number of mols of CO2 is 4.
You should divide the mass of gasoline by the density of gasoline.