$\left|\begin{array}{ccc}1 & a & a^{2} \\ a^{2} & 1 & a \\ a & a^{2} & 1\end{array}\right|=\left(a^{3}-1\right)^{2}$
Let LHS $=\Delta=\mid \begin{array}{lll}1 & a & a^{2}\end{array}$
$\begin{array}{lll}a^{2} & 1 & a \\ a & a^{2} & 1\end{array}$
$\Delta=\mid 1+a^{2}+a \quad 1+a^{2}+a \quad 1+a^{2}+a$
$\begin{array}{ccccc}a^{2} & 1 & & a & \\ a & a^{2} & & 1 & \text { [Applyng } \mathrm{R}_{1} \rightarrow \mathrm{R}_{1}+\mathrm{R}_{2}+\mathrm{R}_{2} \text { ] } \\ = & \left(1+a^{2}+a\right) \mid 1 & 1 & 1 & \end{array}$
$a^{2} \quad 1 \quad a$
$a \quad a^{2} \quad 1 \mid \quad\left[\right.$ Applying $C_{2} \rightarrow C_{2}-C_{1}$ and $\left.C_{3} \rightarrow C_{3}-C_{1}\right]$
$=\left(1+a^{2}+a\right) \mid 1 \quad 0 \quad 0$
$\begin{array}{ccc}a^{2} & 1-a^{2} & a-a^{2} \\ a & a^{2}-a & 1-a \mid\end{array}$
$=\left(1+a^{2}+a\right) \mid 1 \quad 0 \quad 0$
$\begin{array}{llr}a^{2} & (1-a)(1+a) & a(1-a) \\ a & a(a-1) & 1-a \mid\end{array}$
$=\left(1+a^{2}+a\right)(a-1)(a-1) \mid 1 \quad 0 \quad 0$
$a^{2}-(1+a)-a$
$a \quad a \quad-1 \mid \quad\left[\right.$ Taking out $(a-1)$ common from $\mathrm{C}_{2}$ and $\left.C_{3}\right]$
$=\left(a^{3}-1\right)\{(a-1)|1 \quad 0 \quad 0 a \quad-(1+a) \quad-a a \quad a \quad-1|\} \quad\left[\because \quad\left(1+a^{2}+a\right)(a-1)=\left(a^{3}-1\right)\right]$
$=\left(a^{3}-1\right)\left\{(a-1)\left(1+a+a^{2}\right)\right\}$
$=\left(a^{3}-1\right)\left(a^{3}-1\right)$
$=\left(a^{3}-1\right)^{2}$
$=$ RHS
Hence proved.