My Question is the above question:
Let $p,q\in \mathbb{P}$ and $r\in\mathbb{Z}$ with $r\not\equiv 1 \mod p$ and $r^q\equiv 1 \mod p$. Then $p\equiv 1 \mod q$. Hence $q|p-1$.
I was calculating to get a proof, but i didn't get it. So maybe someone knows the solution. Thanks.