Answer:
Of course you can just look at the equation and see that H₂ gained an oxygen atom in the products, but for practice, the best way to break down what's being oxidized and reduces is still this method, even it is lengthy. Remember that Oxidation is Loss, and Reduction is Gain.
OILRIG as a pneumonic to help you remember.
The oxidation state of H₂ in the reactants is 0
The oxidation state of H₂ in the products is:
(-2) + 2x = 0
2x = +2
x = +1
So Hydrogen is getting oxidized
Oxidation state of Carbon in CO₂ is +4
Oxidation state of Carbon in CO is +2
So Carbon is being reduced