In most texts, the BSGS Algorithm solves $$g^x = b \bmod p$$ for x by rewriting the expression to $$g^{jm+i} = b \bmod p$$
then do:
$$g^i = b(g^{-m})^j \bmod p$$
This requires to compute the inverse of $g$. Whats wrong if I transform it this way?: $$g^{jm+i} = b \bmod p$$ to $$g^{jm} + g^{i} = b \bmod p$$ and then lastly: $$g^{i} = \frac{b}{g^{jm}} \bmod p$$
This division of $g^{jm}$ should be possible, when p is prime right? Why can't I compute the Giant Steps, with the expression I got on the right? Thanks for your help.