Determine formula of hydrocarbon from combustion data
In order to &quot;solve&quot; the problem the following assumptions are necessary:

The initial 20 $\mathrm{cm}^3$ volume of the gaseous hydrocarbon and 200   $\mathrm{cm}^3$ volume of oxygen are at rtp also.
The burning of the alkane (from part iii) also creates water, but at rtp the volume of water is negligible since it condenses into the liquid phase.
All the gases follow the ideal gas law so that volumes are directly     proportional to moles.

(i) Determine the volume of oxygen used.
The starting volume of oxygen was 200 $\mathrm{cm}^3$, but 50 $\mathrm{cm}^3$ of the final 150 $\mathrm{cm}^3$ was oxygen, so $200 - 50 = 150$ $\mathrm{cm}^3$ of oxygen was used.
(ii) Determine the volume of the carbon dioxide formed.
With assumption (2), the final volume was 150 $\mathrm{cm}^3$, but 50 $\mathrm{cm}^3$ was oxygen
so $150 - 50 = 100$ $\mathrm{cm}^3$ of carbon dioxide are formed.
(iii) The hydrocarbon was an alkane. Determine the formula of the hydrocarbon.
Since each carbon atom in an alkane will burn to produce one carbon dioxide molecule, then 100/20 = 5 carbon atoms must be in the alkane. So the alkane might be $\ce{C5H12}$. (Thus the hydrocarbon could be isopentane, neopentane, or n-pentane.)
$$\ce{C5H12 + 8O2 -&gt; 5CO2 + 6H2O}$$

Problems with $\ce{C5H12}$
(A) Given that the volumes were supposed to follow the ideal gas law, 20 $\mathrm{cm}^3$ of hydrocarbon reacts with 150 $\mathrm{cm}^3$ of oxygen. That gives a molar ration of 2 to 15. But the molar ratio of $\ce{C5H12}$ burning is 1 molecule of hydrocarbon to 8 molecules of oxygen, or 2 to 16.
(B) The initial total volume of reactants was 150+20 = 170 $\mathrm{cm}^3$. The final volume of product was 100 $\mathrm{cm}^3$. So the ration of reactants to products, neglecting water, is 17 to 10. From the chemical equation the ration is 9 to 5, or 18 to 10.

So the answer must be a cycloalkane $\ce{C5H10}$ which would react with right ratio (2 to 15) and have the right ratio of products to reactants (17 to 10).
$$\ce{2C5H10 + 15O2 -&gt; 10CO2 + 10H2O}$$
CHECK:
Assuming 22.4 liters for a mole of the hydrocarbon, then each mole of hydrocarbon would produce 10 moles of water.
$$10 \times \dfrac{0.020}{22.4} = 0.0089 \text{ moles of water}$$
Since each mole has a mass of 18 grams and water has a density of $1 ~\mathrm{g}/\mathrm{cm}^3$, then there is:
$$ 0.0089\times 18 = 0.16 \mathrm{cm}^3$$ of water which is indeed negligible.
Also at rtp water will have a vapor pressure of about 18 torr out of 760 torr so the partial pressure of water is pretty small also in the gaseous phase.
PS: Thanks to DGS for pointing out that the alkane must be a cycloalkane.