We can determine the formula of the hydrocarbon by using volumes of emitted gases. The general scheme of the reaction is:
After cooling the mixture to the room temperature there are only gaseous carbon dioxide and excess oxygen left in gaseous form.
After the absorption of carbon dioxide by the potassium hydroxide, there is only oxygen left in the gaseous form. So we have 35 ml of oxygen, which left unreacted during the initial explosion. Also, there were 60 ml of carbon dioxide obtained during the initial explosion. From this information, we can determine the amount of oxygen spent onto burning of the hydrocarbon: 140-35=105 ml. The ratio of the volumes of reactants determines the quotients for the reaction. We can divide all numbers by 10 and write down the next equation:
The quotient before water is determined by subtracting the number of Oxygen atoms in the carbon dioxide from the total amount of Oxygen (10.5*2 - 12 = 9). From this equation we can get values x and y: x = 2, y = 6.
So the mentioned hydrocarbon is ethane. Its formula is C2H6.