Finding all integers $k \geq 2$ such that $k^2 \equiv 5k \pmod{15}$. What is going on here? 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?

If $k^2\equiv5k\mod 15,$ then $3 $ and $ 5 $ divide $ k^2-5k=k(k-5)$, 
so $3$ divides $k$ or $k-5$ and $5$ divides $k$ or $k-5$.  
$5$ | $k$ iff $5$ | $k-5$, so we have $3$ divides $k$ or $k-5$ and $5$ divides $k$ and $k-5$.  
That means $15$ divides $k$ or $k-5$; i.e., $k\equiv 0$ or $5  \mod 15$.
