Whenever you see an "if and only if" statement, you need to interpret it in two ways:
- If $m$ has a primitive root, then the only solutions of the
congruence $x^2 \equiv 1 \pmod m$ are $x \equiv \pm 1 \pmod m$. We call this the $\Rightarrow$ direction.
- If the only solutions of the congruence $x^2 \equiv 1 \pmod m$ are $x \equiv \pm 1 \pmod m$, then the integer $m$ has a primitive root. We call this the $\Leftarrow$ direction.
You need to prove that both 1. and 2. holds.
Whenever you're tackling a problem, you need to master all details associated with the problem. Otherwise any attempt at solving it will lead you nowhere, and the work you attempt will not give you any information. And attempts at solving the problem will always give you some kind of information! I always consider solving problems as further exploring the topic.
It seems that you are not quite familiar with the concept of primitive roots. In a nutshell, we are considering the congruence of any integer $a$ to some power modulo $m$: $a^b \equiv c \pmod m$. If it happens $a$ satisfies the condition $$a^{\phi(m)}\equiv 1 \pmod m,$$ then $a$ is a 'primitive root' modulo $m$. Therefore,
- This point says there EXISTS some $a$ such that $a^{\phi(m)}\equiv 1 \pmod m$. Now you need to use this to show that the only solutions of $x^2 \equiv 1 \pmod m$ are $x \equiv \pm 1 \pmod m$.
- This point says that the only solutions of $x^2 \equiv 1 \pmod m$ are $x \equiv \pm 1 \pmod m$. Now you need to use this to show that $m$ has a primitive root.
Hints: For 1.: Let $r$ be a primitive root modulo $m$. Recall first that $\{r, r^2, \ldots, r^{\phi(m)}\}$ is a reduced residue system modulo $m$. This means that all integers $a$ where $(a,m)=1$ are represented, and only these integers can possible satisfy $x^2 \equiv 1 \pmod m$, right? Because if $(x,m)=d > 1$, then $d \mid 1$ in order for the congruence to have any solutions, which is a contradiction. Hence $(x,m)=1$. But then we must have that $x \equiv r^t$ for some $t \in \{1,2,\ldots,\phi(m)\}$ (make sure you understand this step). Hence $$r^{2t}\equiv 1 \pmod m,$$ and therefore $\phi(m) \mid 2t$, so that $\phi(m) k = 2t$ or $t = \phi(m)k/2$. Therefore $$x \equiv r^t \equiv r^{\phi(m)k/2} = \left( r^{\phi(m)/2} \right)^k \equiv (-1)^k \equiv \pm 1 \pmod m.$$
For 2.: Suppose that the only solutions are $x \equiv \pm 1 \pmod m$ and that there is no primitive root modulo $m$. By the primitive root theorem, $m$ is not $2,4,p^a, 2p^a$. We can therefore write $m$ in the form $2^b M$ where $b \geq 3$ and $M$ an odd integer. Since $(2^b,M)=1$ we can split this up and use the Chinese Remainder Theorem. It can be shown that there are at least three solutions of $s^2 \equiv 1 \pmod{2^b}$. Call these $s_i$, $i=1,2,3$. Certainly there is one solution of $x^2 \equiv 1 \pmod M$. By the Chinese Remainder Theorem, the system $x \equiv s_i \pmod{2^b}$ ($i=1,2,3$), $x^2 \equiv 1 \pmod M$ has a unique solution. Since these are distinct modulo $m$, there must be one that is not $\pm 1 \pmod m$. Hence our assumption was false and $m$ must have a primitive root.