Percent hydrogen and carbon
Your initial compound weights 1g, and it is only made of C and H. The products are CO2 and H2O. In other words (the reaction is not balanced, but for our purpose we don't care):

CxHy + O2 --> CO2 + H2O

From the grams of CO2 you can get back to the moles (and therefore grams) of C in the initial compound, while from the grams of water you can get to the moles (and grams) of H.

moles of C = 1.42 g CO2 x $\frac{\text{1 mol CO2}}{\text{44.0 g CO2}}$  x $\frac{\text{1 mol C}}{\text{1 mol CO2}}$ = 0.0323 mol C
You then multiply by the molar mass of carbon, which is 12 g/mol, and you get 0.388 g. 

We do the same thing for hydrogen: 

moles of C = 0.872 g H2O x $\frac{\text{1 mol H2O}}{\text{18.0 g H2O}}$  x $\frac{\text{2 mol H}}{\text{1 mol H2O}}$  = 0.0969 mol H = 0.0989 g  

Note that we did the same thing twice, but since we have two moles of H in water we multiplied by 2 in the second equation.
Now we just have to find the percentage: 
You get 

$\frac{\text{0.388 g}}{\text{1 g sample}}$ *100 % =  38.8 % C 

$\frac{\text{0.0989 g}}{\text{1 g sample}}$ *100 % =  9.89 % H 

I hope this helps!