The reaction produces 6 g of carbon dioxide.
The word equation is
methane + oxygen → carbon dioxide + water
12.2 g + 4 g → x g + 20 g
The Law of Conservation of Mass tells us the total mass of the reactants must equal the mass of the products. Then
12.2 g + 14 g = x g + 20 g
x = 12.2 + 14 – 20 = 6
The mass of carbon dioxide is 6 g.
Note: The answer can have no decimal places because you gave none for the masses of oxygen and water.