Combustion reactions have the following form:
$$ \ce{hydrocarbon + O2(g) -> CO2 + H2O} $$
To obtain the greatest mass of carbon dioxide,
we want to maximize the moles of carbon dioxide produced.
We therefore want to maximize the moles of carbon in the reactants.
Assuming an equal mass of the compounds,
we can calculate the number of moles of carbon reacted.
For example, lets say we reacted \(\pu{1 g}\) of each.
$$ \pu{1 g }\ce{C6H6} \cdot \frac{\pu{1 mol }\ce{C6H6}}{\pu{78 g }\ce{C6H6}} \cdot \frac{\pu{6 mol }\ce{C}}{\pu{1 mol }\ce{C6H6}} = \frac{1}{13}$$
$$ \pu{1 g }\ce{C6H12} \cdot \frac{\pu{1 mol }\ce{C6H12}}{\pu{84 g }\ce{C6H12}} \cdot \frac{\pu{6 mol }\ce{C}}{\pu{1 mol }\ce{C6H12}} =\frac{1}{14}$$
$$ \pu{1 g }\ce{C6H12O6} \cdot \frac{\pu{1 mol }\ce{C6H12O6}}{\pu{180 g }\ce{C6H12O6}} \cdot \frac{\pu{6 mol }\ce{C}}{\pu{1 mol }\ce{C6H12O6}} = \frac{1}{30} $$
$$ \pu{1 g }\ce{CH4} \cdot \frac{\pu{1 mol }\ce{CH4}}{\pu{16 g }\ce{CH4}} \cdot \frac{\pu{1 mol }\ce{C}}{\pu{1 mol }\ce{CH4}} =\frac{1}{16} $$
Benzene would result in the greatest number of moles of carbon.
In some cases we can simply pick the molecule with the lowest mass.
However, note that the molecules differ in the number of carbon atoms present.
In this question, we could compare the first three options (6 carbon molecules) relatively easily.
We will have to take care when considering methane (1 carbon).