Find the matrix $(X^{-1} A X)^n$ 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?

Your approach is correct. As you said, you know that
$$(Y-E)^2=0$$
is the zero matrix. In this way, to compute $Y^n$ you should calculate the remainder of dividing the polynomial $y^n$ by $(y-1)^2$ and evaluate it on $Y$ (as the divisor times the quotient will vanish when you evaluate $Y$ on it and so only remains the remainder evaluated at $Y$). In this particular case, write
$$y^n=((y-1)+1)^n=\sum_{k=0}^n\binom{n}{k}(y-1)^k$$
and then it is clear that the remainder is
$$n(y-1)+1=ny+(n-1)$$
and so
$$Y^n=nY+(n-1)E$$
as you have shown.
