Always balance the most complicated molecules first (we'll leave #O_2# last here). We see that we have 1 carbon on both sides, so that's fine, but we have 4 H in the reactants and only 2 H in the products. Make the coefficient of #H_2O# 2 and then the hydrogens will be balanced. Now all that's left to do is balance O_2, which is simple. We see that we now have 4O on the products side, since we added the 2 in front of #H_2O# and there is another 2O in #CO_2#. All we have to do is add a 2 in front of the #O_2#.