Using pV = nRT, moles of gas is proportional to volume, so you can figure out 1 mole of hydrocarbon needs 6 moles of oxygen so 1 x (2c + 0.5h) = 6 x (2), and you can just try the formulae given and see which one works.
That weird looking formula is because every mole of C needs two moles of O to combust and every mole of H needs half a mole of O to combust (to make CO2 and H2O). Of course every mole of O2 has two moles of O.