Prove: if $c^2+8 \equiv 0$ mod $p$ then $c^3-7c^2-8c$ is a quadratic residue mod $p$.
$$2c-7\equiv2c-7+c^2+8\pmod p\equiv(c+1)^2$$
We have that $$(c +1)^2 = c^2 + 2c + 1 = c^2 + 2c + 8 -7 = (c^2 + 8) + (2c - 7) \equiv 2c - 7 \mod p.$$ This proves the claim.
Hint:
As $c^2\equiv-8\pmod p,$
$$c(c+1)=c^2+c\equiv c-8\pmod p$$
$c(c+1)(c-8)\equiv?$
I believe this is how the problem naturally came into being .