I have the next statement that has to be proved:
Let $p$ be a prime number where $p>10$. Prove that $p-2$ has an inverse module $p$, this is, a number $q$ exists where $(p-2)q \equiv 1\mod(p)$.
I have this so far:
From $(p-2)q \equiv 1\mod(p)$ I know that $(p-2)q=kp+1$ and $p|((p-2)q-1)$.
So, $p|((p-2)q-1)$ is $p|pq-2q-1$.
I don't know which the next step should be exactly. Perhaps something like: $q=24k+r$ where $0 \le r<24$ and trying the different values $r$ can take?
Let $p=2k+1$. Then
$$2k+1 \equiv 0 \pmod{p}$$ $$2k \equiv -1 \pmod{p}$$ $$-2k \equiv 1 \pmod p$$ $$pk-2k \equiv 1 \pmod{p}$$ $$(p-2) k \equiv 1 \pmod{p}$$
Note that we actually proved that the reciprocal is $\frac{p-1}{2}$.