The reaction considered here is
a CH₄ + b O₂ ⇒ c CO₂ + d H₂O
where a, b, c, d are unknown coefficients.
To balance the reaction, we want the same number of the same atoms on either side, so
• C : a = c
• H : 4a = 2d
• O : 2b = 2c + d
Suppose a = 1; then c = 1 and d = 2 and b = 2. So the balanced reaction is
CH₄ + 2 O₂ ⇒ CO₂ + 2 H₂O
and this means the mole ratio of oxygen to methane is 2 to 1.