I'm having some trouble with the following question from chapter 1.4 of Beachy and Blair's Abstract Algebra.
Let $a,b$ be integers, and let $p$ be a prime number of the form $p=2k+1$. Show that if $p\!\!\not|a$ and $a\equiv b^{2}\!\!\mod p$, then $a^k\equiv1\!\!\mod p$.
My attempt: Since $p\!\!\not|a$ and $p$ is prime, $(a,n)=1$. Then by Euler's Theorem and using the fact that $\phi(p)=p-1$ for prime $p$ \begin{align} a^{\phi(p)} & \equiv1\!\!\mod p\\ a^{p-1} & \equiv1\!\!\mod p\\ a^{(2k+1)-1} & \equiv1\!\!\mod p\\ a^{2k} & \equiv1\!\!\mod p\\ (a^{k})^{2} & \equiv1\!\!\mod p.\\ \end{align}
I'm unsure how to use the second condition $a\equiv b^{2}\!\!\mod p$ to proceed.