Let $p>2$ be a prime number and consider the congruence $$aX^2+bX+c \equiv 0 \pmod{p},$$ where $p \not \mid a$, and let $m$ be a natural number such that $mp +b^2-4ac \geq 0$. Show that the congruence have a solution if, and only if, $mp+b^2=4ac$ is quadratic residue $\mod p$.
Honestly, I passed hours thinking about it but I couldn't get anywhere. I just know results that I couldn't relate to this problem, so if you could say explicitly what theorems you're using, I'd be grateful!
Multiply your congruence by $4a$.
Complete the square in the usual way for quadratics.
There is a solution if and only if $b^2-4ac=(2ax+b)^2$ mod $p$ i.e. if and only if $b^2-4ac$ is a q.r.