Given a reaction's starting amounts and either its equilibrium constant or one measured equilibrium quantity, the full equilibrium composition can be worked out systematically using an Initial - Change - Equilibrium (ICE) table: list the initial moles (or concentrations) of every species, the change each undergoes (in terms of a single unknown extent of reaction, x, scaled by each species' own stoichiometric coefficient), and add them to get the equilibrium amount.
For H2(g)+I2(g)⇌2HI(g), starting with a mol H2 and b mol I2 in volume V, and x mol of each reacting to give 2x mol HI, the equilibrium concentrations are Va−x, Vb−x, V2x, giving KC=(a−x)(b−x)4x2 (and, since Δng=0, KP=KC directly).
For the dissociation PCl5(g)⇌PCl3(g)+Cl2(g), starting with a mol PCl5 and x mol dissociating, the equilibrium concentrations are Va−x, Vx, Vx, giving KC=(a−x)Vx2; converting to KP (since Δng=+1) via total moles n=a+x at equilibrium gives KP=a2−x2x2P.
For ammonia synthesis N2(g)+3H2(g)⇌2NH3(g), starting with a mol N2 and b mol H2, x mol N2 reacting with 3x mol H2 to form 2x mol NH3, the equilibrium concentrations are Va−x, Vb−3x, V2x, giving KC=(a−x)(b−3x)34x2V2; since Δng=−2, KP=KC(RT)−2. …