Solve using Fermat Theorem $x^{86} ≡ 6 $ (mod 29)
I have the solution but don't understand it. Can someone write step by step instructions on how to do this type of questions. 
See Question 1(b) for solution: http://palmer.wellesley.edu/~ivolic/pdf/Classes/MATH349CryptographyFall11/Solutions/349%20Crypto%20homework%203%20solutions.pdf

First of all, it is clear that $x\ne 0\ (\ mod \ 29\ )$ holds. So, due to Fermats
 theorem, we have $x^{28}\equiv 1\ (\ mod\ 29\ )$. So, we can conclude that
 $x^{84}=(x^{28})^3\equiv 1\ (\ mod\ 29\ )$. 
So, the eqaution simplifies to $x^2\equiv 6\ (\ mod\ 29\ )$ , which has the
 solutions $8$ and $21$.
