Every chemistry textbook I've read will have a chapter on the rate law. It will say something like, given a reaction $a\text{A} + b\text{B} \rightarrow c\text{C} + d\text{D}$, the rate law (for the forward reaction) is given by:
$$ \text{rate} = k[A]^x[B]^y $$
and the text will usually stress that $x$ and $y$ are experimentally determined and unrelated to the stochiometric coefficients.
Then, there will be a subsequent chapter about equilibrium expressions. Using the same reaction, $a\text{A} + b\text{B} \rightarrow c\text{C} + d\text{D}$, the equilibrium expression will be given by:
$$ K_{eq} = \frac{[C]^c[D]^d}{[A]^a[B]^b} $$
In this case, the stochiometric coefficients are relevant. I would be willing to blindly accept this, but the text will then go on to "derive" the equilibrium expression from the rate law by noting that, in equilibrium, the rate of the forward reaction is equal to the rate of the reverse reaction. That is, $rate_{forward} = k_f[A]^a[B]^b = rate_{reverse} = k_r[C]^c[D]^d$. Rearranging this equation, we get:
$$ \frac{k_f}{k_r} = K_{eq} = \frac{[C]^c[D]^d}{[A]^a[B]^b} $$
How are we suddenly able to use the stochiometric coefficients in the rate law when deriving the equilibrium expression? What am I missing?