Answer: Eigenvectors may be taken as \(\begin{pmatrix}1\\1\\-1\end{pmatrix}\) for \(\lambda=1\), and \(\begin{pmatrix}1\\1\\-2\end{pmatrix}\) for \(\lambda=4\).
The vector \(\begin{pmatrix}0\\1\\-1\end{pmatrix}\) has eigenvalue \(9\).
One suitable choice is
\(\mathbf P=\begin{pmatrix}1&1&0\\1&1&1\\-1&-2&-1\end{pmatrix},\quad \mathbf D=\begin{pmatrix}1&0&0\\0&4&0\\0&0&9\end{pmatrix},\quad \mathbf P^{-1}=\begin{pmatrix}1&1&1\\0&-1&-1\\-1&1&0\end{pmatrix}.\)
Take \(\mathbf C=\begin{pmatrix}1&0&0\\0&2&0\\0&0&3\end{pmatrix}\). Then one suitable square root is
\(\mathbf B=\mathbf P\mathbf C\mathbf P^{-1}=\begin{pmatrix}1&-1&-1\\-2&2&-1\\2&0&3\end{pmatrix}.\)
For \(\lambda=1\), solve \((\mathbf A-\mathbf I)\mathbf v=0\). This gives an eigenvector proportional to \(\begin{pmatrix}1\\1\\-1\end{pmatrix}\).
For \(\lambda=4\), solve \((\mathbf A-4\mathbf I)\mathbf v=0\). This gives an eigenvector proportional to \(\begin{pmatrix}1\\1\\-2\end{pmatrix}\).
Now multiply \(\mathbf A\begin{pmatrix}0\\1\\-1\end{pmatrix}\):
\(\begin{pmatrix}1&-3&-3\\-8&6&-3\\8&-2&7\end{pmatrix}\begin{pmatrix}0\\1\\-1\end{pmatrix}=\begin{pmatrix}0\\9\\-9\end{pmatrix}=9\begin{pmatrix}0\\1\\-1\end{pmatrix}.\)
So the corresponding eigenvalue is \(9\).
Use the three eigenvectors as the columns of \(\mathbf P\), in the same order as the diagonal entries of \(\mathbf D\):
\(\mathbf P=\begin{pmatrix}1&1&0\\1&1&1\\-1&-2&-1\end{pmatrix},\qquad \mathbf D=\begin{pmatrix}1&0&0\\0&4&0\\0&0&9\end{pmatrix}.\)
Direct calculation gives
\(\mathbf P^{-1}=\begin{pmatrix}1&1&1\\0&-1&-1\\-1&1&0\end{pmatrix}.\)
Since the diagonal entries of \(\mathbf D\) are \(1\), \(4\), and \(9\), choose
\(\mathbf C=\begin{pmatrix}1&0&0\\0&2&0\\0&0&3\end{pmatrix},\qquad \mathbf C^2=\mathbf D.\)
Then
\(\mathbf B=\mathbf P\mathbf C\mathbf P^{-1}\)
satisfies \(\mathbf B^2=\mathbf A\), because
\((\mathbf P\mathbf C\mathbf P^{-1})^2=\mathbf P\mathbf C^2\mathbf P^{-1}=\mathbf P\mathbf D\mathbf P^{-1}=\mathbf A.\)
Multiplying the matrices gives
\(\mathbf B=\begin{pmatrix}1&-1&-1\\-2&2&-1\\2&0&3\end{pmatrix}.\)