How to factorize this determinant? 
The question is to factorize $$\det\begin{pmatrix}(x^2+1)^2 & (xy+1)^2 & (xz+1)^2  \\ (xy+1)^2 & (y^2+1)^2 & (yz+1)^2 \\ (xz+1)^2 & (yz+1)^2 & (z^2+1)^2  \end{pmatrix}.$$

I have a hint which is considering the factorization of $\det\begin{pmatrix}1 & a & a^2  \\ 1 & b & b^2 \\ 1 & c & c^2  \end{pmatrix}$ where all entries are real numbers. 
I don't have any idea how to use the hint. So, I factorize $\det\begin{pmatrix}(x^2+1)^2 & (xy+1)^2 & (xz+1)^2  \\ (xy+1)^2 & (y^2+1)^2 & (yz+1)^2 \\ (xz+1)^2 & (yz+1)^2 & (z^2+1)^2  \end{pmatrix}$ directly and I get the answer which is $2(z-y)^2(z-x)^2(y-x)^2$.
My question is how to use the hint to factorize the given determinant? It is because my method seems very tedious.

By calculation (I got this slightly mixed up in my comment),
$$\begin{pmatrix} 1 & 2x & x^2 \\ 1 & 2y & y^2 \\ 1 & 2z & z^2 \end{pmatrix} \begin{pmatrix} 1 & x & x^2 \\ 1 & y & y^2 \\ 1 & z & z^2 \end{pmatrix}^\top = \begin{pmatrix} 1 + 2x^2 + x^4 & 1 + 2xy + (xy)^2 & 1 + 2xz + (xz)^2 \\ 1 + 2xy + (xy)^2 & 1 + 2y^2 + y^4 & 1 + 2yz + (yz)^2 \\ 1 + 2xz + (xz)^2 & 1 + 2yz + (yz)^2 & 1 + 2z^2 + z^4 \end{pmatrix}.$$
Using the hint, the first matrix has determinant $2(x - y)(y - z)(x - z)$ and the second matrix has the determinant $(x - y)(y - z)(x - z)$. We can now just multiply these determinants together to get the determinant of the right hand side, which is the matrix in question.
