<s>[INST] Finding determinant of $3\times3$ matrix $$A = \left(\begin{matrix}
\lambda - 1 & -1 & -1 \\
1 & \lambda - 3 & 1 \\
-3 & 1 & \lambda + 1 \\
\end{matrix}\right)$$
$$\det A = \begin{vmatrix}A\end{vmatrix} = 
(\lambda - 1) \begin{vmatrix}
\lambda - 3 & 1 \\
1 & \lambda + 1 \\
\end{vmatrix} + 1\begin{vmatrix}
1 & 1 \\
-3 & \lambda + 1 \\
\end{vmatrix} -
1\begin{vmatrix}
1 & \lambda - 3 \\
-3 & 1 \\
\end{vmatrix}\\
= ((\lambda - 1)(\lambda - 3)(\lambda + 1)) - (1 + (\lambda + 1) + 3) + (1 +3\lambda - 9) \\
= (\lambda - 1)(\lambda - 3)(\lambda + 1) + (\lambda + 1) + 2(\lambda - 3)$$
The solution says that it is $(\lambda - 2)(\lambda + 2)(\lambda - 3)$. I feel like I am so close, but I don't get what I am supposed to do to get to the solution. 
 [/INST] HINT
We can simplify a little bit summing the third to the first row
$$\begin{vmatrix}
\lambda - 1 & -1 & -1 \\
1 & \lambda - 3 & 1 \\
-3 & 1 & \lambda + 1 \\
\end{vmatrix}= \begin{vmatrix}
\lambda -4 & 0 & \lambda \\
1 & \lambda - 3 & 1 \\
-3 & 1 & \lambda + 1 \\
\end{vmatrix}$$
and using Laplace expansion in the first row to obtain
$$\begin{vmatrix}
\lambda -4 & 0 & \lambda \\
1 & \lambda - 3 & 1 \\
-3 & 1 & \lambda + 1 \\
\end{vmatrix}
=(\lambda -4) \cdot \begin{vmatrix}
\lambda - 3 & 1 \\
 1 & \lambda + 1 \\
\end{vmatrix}
+\lambda\cdot \begin{vmatrix}
1 & \lambda - 3  \\
-3 & 1  \\
\end{vmatrix}$$
Can you proceed from here?
</s>