Let an modular equation be as follows:
$a\equiv b^c\mod{n},$
and we don't know the $b$ coefficient. So, to find $b$ we can raise both sides to $\frac{1}{c}$ (or $c^{-1}$) power like this:
$a^{\frac{1}{c}}\equiv b\mod{n}.$
Consider simple case, in which all conditions (of modular arithmetic) are satisfied, why, after raising to this power, we have to calculate $\ c^{-1}$ in $\mod{n-1}$, not $\mod{n}$:
$\frac{1}{c}\equiv 1\cdot c^{-1} \mod{n-1}.$
To illustrate this problem, I have an example:
$77\equiv x^{51}\mod{107}$ ( $x=5$ satisfing this equation),
$77^{\frac{1}{51}}\equiv x \mod{107}$.
If we compute $\frac{1}{51}\equiv 21 \mod{107}$, then:
$77^{21}\equiv66\mod{107}\neq5\mod{107}$,
so we have to get $\frac{1}{51}\mod{106}\equiv79$:
$77^{79}\equiv5\mod{107}$.
My question, again, is why it works in this way, is any theorem talks about it (inverse power)?
Regards