For the reaction A + B ⇋ C + D the equilibrium constant is
K = [C][D][A][B]
aA + bB ⇋ cC + dD
The rate of forward reaction = k1 [A]a [B]b
The rate of backward reaction = k2 [C]c [D]d
At Equilibrium, the rate of the backward reaction = the rate of the forward reaction
k2 [C]c [D]d = k1 [A]a [B]b
K = k1k2 = [C]c[D]d[A]a[B]b