Equilibrium composition of methane–water system under given conditions
Let
$$moles\ CH_4=1-e_1$$
$$moles\ H_2O=1-(e_1+e_2)$$
$$moles\ CO=e_1-e_2$$
$$moles\ CO_2=e_2$$
$$moles\ H_2=3e_1+e_2$$
where the $e_1$ is the number of moles of $CH_4$ destroyed and $e_2$ the number of moles of $CO_2$ that are produced.
So the equilibrium equations are going to read:$$\frac{(e_1-e_2)(3e_1+e_2)^3}{(1-e_1-e_2)(1-e_1)(2+2e_1)^2}=K_1$$and $$\frac{e_2(3e_1+e_2)}{(e_1-e_2)(1-e_1-e_2)}=K_2$$