(D)
If a hydrocarbon is 25% hydrogen by mass, then it is 75% carbon, which corresponds to 1 mole of carbon (at approximately 12 g/mol) combining with 4 moles of hydrogen (at approximately 1 g/mol each).
Another way to consider this problem is to assume that there is 100 g of material, and 25 grams of that is hydrogen and 75 grams is carbon. Converting each of these values to molar amounts will result in a 4:1 hydrogen/carbon ratio.