Given that $$A=\begin{bmatrix}1&1\\ 0&1\end{bmatrix}$$ $$X=\begin{bmatrix}2&1\\ 3&2\end{bmatrix}$$
I computed that $$X^{-1} A X = \begin{bmatrix}7&4\\ \:\:\:\:-9&-5\end{bmatrix}=Y$$
Now the usual way would be to find the eigenvalues and corresponding eigenvectors and then calculate the nth degree for this matrice, however it turns out that this matrix has only one eigenvalues and one eigenvector so I can't use that method.
Instead I thought of using the Cayley-Hammilton theorem and after finding the characteristic polynomial we have:
$Y^2=2Y-E$ which ultimately yields $Y^n = nY-(n-1)E$ is my approach correct?