Okay, I’ve tried the problem myself and found that it’s not very straightforward (I believe it’s because the modulus is not a prime). Here’s my solution.
$\displaystyle x^2 + 6x - 31 \equiv 0\,(\bmod\,72)$
$\displaystyle x^2 + 6x + 9 \equiv 40\,(\bmod\,72)$
$\displaystyle (x+3)^2 \equiv 40\,(\bmod\,72)$
$\displaystyle X^2 \equiv 40\,(\bmod\,72)$
where $\displaystyle X=x+3.$ It is clear that $\displaystyle X$ must be even so let $\displaystyle X=2Y.$
$\displaystyle 4Y^2 \equiv 40\,(\bmod\,72)$
$\displaystyle Y^2 \equiv 10\,(\bmod\,18)$
Again we see that $\displaystyle Y$ must be even, say $\displaystyle Y=2Z.$
$\displaystyle 4Z^2 \equiv 10\,(\bmod\,18)$
$\displaystyle 2Z^2 \equiv 5\,(\bmod\,9)$
$\displaystyle 2Z^2 \equiv 14\,(\bmod\,9)\quad(\because\ 5\equiv14\,(\bmod\,9))$
$\displaystyle Z^2 \equiv 7\,(\bmod\,9)\quad(\because\ \gcd(2,9)=1)$
Trying $\displaystyle 1^2,\,2^2,\,3^2,\,\ldots,\,8^2$ in turn, we find that $\displaystyle Z=4,\,5$ are the only solutions between 1 and 8. Hence the general solution is
$\displaystyle Z\,=\,4+9n,\,5+9n$
$\displaystyle \implies\ Y\,=\,2Z\,=\,8+18n,\,10+18n$
$\displaystyle \implies\ X\,=\,2Y\,=\,16+36n,\,20+36n$
$\displaystyle \implies\ X-3\,=\,\fbox{$x\,=\,13+36n,\,17+36n$}$
Maybe someone has a neater solution?