it's not clear to me how you got [0, 0, 1]. As I said before, you want a "v" such that (M+3i)^2v= [2, -1, 1]. That means you have to solve
\begin{bmatrix}1 & 3 & 1 \\ 0 & -1 & -1 \\ 1 & 2 & 0\end{bmatrix}\begin{bmatrix}x \\ y \\ z\end{bmatrix}= \begin{bmatrix}2 \\ -1 \\ 1\end{bmatrix}.
That gives the equations x+ 3y+ z= 2 -y- z= -1, and x+ 2y= 1. The second equation is the same as z= -y+ 1 and the third is the same a x= -2y+ 1. Taking y= 0 would give v= (1, 0, 1) as you have.
Now look for u such that (M+ 3I)u= v which means you must have
\begin{bmatrix}1 & 3 & 1 \\ 0 & -1 & -1 \\ 1 & 2 & 0\end{bmatrix}\begin{bmatrix}x \\ y \\ z\end{bmatrix}= \begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}.
That gives the equations x+ 3y+ z= 1, -y-z= 0. and x+ 2y= 1. The second equation is the same as z= -y and the third equation x= -2y+1. Then the first equation is satisfied for all y. If you take y= 0, you get [1, 0, 1] the same as before, but if you take y= 1, you get u= [-1, 1, -1].
Let P be the matrix having those vectors as columns,
P= \begin{bmatrix}2 & 1 & -1 \\ -1 & 0 & 1 \\ 1 & 1 & -1\end{bmatrix}
and you will find that
P^{-1}AP= \begin{bmatrix}-3 & 1 & 0 \\0 & -3 & 1 \\ 0 & 0 & -3\end{bmatrix}.