<s>[INST] How to prove $p$ divides $a^{p - 2} + a^{p - 3} b + a^{p - 4} b^2 + \cdots + b^{p - 2}$  when $p$ is prime, $a, b \in \mathbb{Z}$ and $a,b \lt p$? If $p$ is a prime number and $a, b \in \mathbb{Z}$ such that $a,b \lt p$, then how could we prove that $p$ divides 
$\left(a^{p - 2} + a^{p - 3} b + a^{p - 4} b^2 + \cdots + b^{p - 2}\right)$? 
 [/INST] We have
$$(a-b)(a^{p-2} + a^{p-3}b + \ldots + ab^{p-3} + b^{p-2}) = a^{p-1} - b^{p-1}.$$
If $p\nmid a$ and $p\nmid b$ then the right side is congruent to $1-1 = 0$ by Fermat's little theorem, i.e $p$ divides the product on the left. If furthermore $a \not\equiv b \pmod p$ then $p$ must already divide $a^{p-2} + a^{p-3}b + \ldots + ab^{p-3} + b^{p-2}$.
The statement becomes false if you do not assume $a \not\equiv b \pmod p$, e.g. for $a=b=1$ the sum equals $p-1$ which is not divisible by $p$.
Also, if $p| a$ (w.l.o.g.) the sum is congruent to $b^{p-2}$ which is only divisible by $p$ if $p|b$.
</s>