Step 1:
Let $\Delta=\begin{vmatrix} (x-2)^2 & (x-1)^2 & x^2 \\ (x-2)^2 & x^2 & (x+1)^2 \\ x^2 & (x+1)^2 & (x+2)^2 \end{vmatrix}$
Apply $R_2 \to R_2-R_1$ and $R_3 \to R_3-R_1$
$\Delta=\begin{vmatrix} (x-2)^2 & (x-1)^2 & x^2 \\ (2x-3) & (2x-1) & (2x+1) \\ 4(x-1) & 4x & 4(x+1) \end{vmatrix}$
Take 4 as common vector from $R_3$
$\Delta=4\begin{vmatrix} (x-2)^2 & (x-1)^2 & x^2 \\ (2x-3) & (2x-1) & (2x+1) \\ (x-1) & x & (x+1) \end{vmatrix}$
Apply $R_2 \to 2R_3-R_2$
$\Delta=4\begin{vmatrix} (x-2)^2 & (x-1)^2 & x^2 \\ 1 & 1 & 1 \\ (x-1) & x & (x+1) \end{vmatrix}$
Step 2:
Apply $C_2 \to R_2-C_3$ and $C_3 \to C_3-C_1$
$\Delta=4\begin{vmatrix} (x-2)^2 & (-2x+1) & 4x-4 \\ 1 & 0 & 0 \\ (x-1) & -1 & 2 \end{vmatrix}$
Expanding along $R_2$
$\Delta =4 [1(-4x+2+4x-4)]$
$\Delta=4 \times -2$
$\Delta =-8$
Hence proved