My midterm exam is coming and I have some problem in dealing with this kind of question. This is an exercise on my text book and not a homework.
Suppose $gcd(a,n)=1$.
Question(a)
If $a^x\equiv b\pmod n$ and $xy\equiv 1\pmod {\phi(n)}$, show that $a\equiv b^y\pmod n$.
Question(b)
If $gcd(x,{\phi(n)})=1$, show that $a^x\equiv b^y$ if and only if $a\equiv b\pmod n$.
$$a^x\equiv b\pmod n\implies b^y\equiv a^{xy}\equiv a^1\pmod n$$ as $xy\equiv1\pmod{\phi(n)}$