According to Fermat's little theorem, if $p$ is a prime number, then for any integer $n$,
$$n^{p-1}\mod p = 1$$
In question, $p$ is 19, and so for any integer $n$, $(n^{18})\mod 19 = 1$.
So for $n^9$, we find square roots of 1 mod 19, which is $\pm 1$.