a) Ta có: \(\left(x-1\right)^2+x^2-1=\left(x+1\right)\left(x+3\right)\)
\(\Leftrightarrow\left(x-1\right)^2+\left(x-1\right)\left(x+1\right)=\left(x+1\right)\left(x+3\right)\)
\(\Leftrightarrow\left(x-1\right)\left(x-1+x+1\right)=\left(x+1\right)\left(x+3\right)\)
\(\Leftrightarrow\left(x-1\right)\cdot2x-\left(x+1\right)\left(x+3\right)=0\)
\(\Leftrightarrow2x^2-2x-\left(x^2+4x+3\right)=0\)
\(\Leftrightarrow2x^2-2x-x^2-4x-3=0\)
\(\Leftrightarrow x^2-6x-3=0\)
\(\Leftrightarrow x^2-6x+9-12=0\)
\(\Leftrightarrow\left(x-3\right)^2-12=0\)
\(\Leftrightarrow\left(x-3\right)^2=12\)
\(\Leftrightarrow\left[{}\begin{matrix}x-3=\sqrt{12}\\x-3=-\sqrt{12}\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=\sqrt{12}+3=3+2\sqrt{3}\\x=-\sqrt{12}+3=3-2\sqrt{3}\end{matrix}\right.\)
Vậy: \(x=3\pm2\sqrt{3}\)