\(\left(x^2+x+1\right)\left(x^2-x+1\right)\left(x^2-1\right)\)
\(=\left(x^2+x+1\right)\left(x^2-x+1\right)\left(x^2-1^2\right)\)
\(=\left(x^2+x+1\right)\left(x^2-x+1\right)\left(x+1\right)\left(x-1\right)\)
\(=\left[\left(x-1\right)\left(x^2+x+1\right)\right]\left[\left(x+1\right)\left(x^2-x+1\right)\right]\)
\(=\left(x^3-1^3\right)\left(x^3+1^3\right)\)
\(=\left(x^3+1\right)\left(x^3-1\right)\)
\(=\left(x^3\right)^2-1^2\)
\(=x^6-1\)