The question is as follows:
Find all integers $k \geq 2$ such that $k^2 \equiv 5k \pmod{15}$.
I have an issue related to this question (its not about the solution to the question):
I know that $\overline{k} \in \mathbb{Z}_{15}$ is invertible if and only if $k$ and $15$ are relatively prime. So, assume $\overline{k}$ is invertible. Then, $\overline{k}^2 = \overline{5}\overline{k}$ implies $\overline{k} = \overline{5}.$ But isn't $\overline{5}$ not invertible, since $5$ is not relatively prime with 15? What am I missing?
You assume there is an invertible root $\bmod 15\,$ then obtain the contradiction that the root is not invertible. This shows only that there are no invertible roots. But here the roots are all non-invertible:
$$\bmod 15\!:\,\ x(x\!-\!5)\equiv 0\iff x\equiv 0,5,\ \ {\rm by}\ \ p,q = 3,5\ \ \rm below\qquad\ \ \ $$
Theorem $\ $ If $\,p\,$ is prime, $\,p\nmid q\,$ and $\,q\,$ is squarefree (e.g. $q$ prime) and $\,a_i\equiv a_j\pmod{\!q}\,$ then
$$\bmod pq\!:\, \ f(x)=(x\!-\!a_1)\cdots(x\!-\!a_n)\equiv 0\iff x\equiv a_1,\ldots, a_n\qquad $$
Proof $ $ (sketch) $ $ By $\,p,q\,$ coprime we have $\ pq\mid f(x)\iff p,q\mid f(x)$
By $\,p\,$ prime: $\,p\mid f(x)\iff p\mid x\!-\!a_k\,$ for some $k.\,$ And $\bmod q\!:\ a_i\equiv a_j\,$ so $\,f \equiv (x\!-\!a_1)^n,\,$ so
by $\,q\,$ squarefree: $\ q\mid f(x)\iff q\mid (x\!-\!a_1)^n\iff q\mid x\!-\!a_1 \iff q\mid x\!-\!a_k$
Combining we conclude $\ p,q\mid x\!-\!a_k\iff pq \mid x\!-\!a_k\ $ by $\,p,q\,$ coprime.
Remark $ $ Here the only roots are the obvious "constant" roots $\,x\equiv a_i\,$ because all the roots coincide mod $q$. In the more general case where there are distinct roots mod $\,p\,$ and $\,q\,$ then there will be other roots by CRT lifting $\,x\equiv a_i\pmod{p}, x \equiv a_j\pmod{q}$ to a unique root $\bmod pq,\,$ where the lifted roots in the case $\,i\neq j$ will differ from the "constant" roots $\,x\equiv a_i$ when $\,i = j.\,$ You can find many examples of this in prior posts.