let us have a equilibrium reaction as
X(g) +Y (g) → Z (g) (reversible sign cannot be shown so consider it urself.
for this reaction there exists a equilibrium constant Keq
represented as
Keq=[Z]/[X][Y]
whe [X],[Y],[Z] are concentrations of X Y Z respectively
here since it is equilibrium rate of forward reaction is directly proportional to the concentration of reactant and rate of backward reaction is directly proportional to concentration of prosucts
hence
rate of forward = kf[X][Y]
where kf is rate constant for forward reaction and
rate of backward = kr [Z]
where kr is rate constant for reverse reaction
but forward reaction=backward reaction
kf[X][Y]=kr[Z]
kf/kr = [Z]/[X][Y]
hence Keq= [Z]/[X][Y]