I have two matrices
\begin{bmatrix}2&1&0\\0&2&0\\0&0&2\end{bmatrix}
and
\begin{bmatrix}2&1&0\\0&2&1\\0&0&2\end{bmatrix}
I need to show they are not similar. However, they have the same determinant, rank, nullity and eigenvalues. They are also both invertible.
If the matrices were similar, that means that both of them would have the same amount of independent eigenvectors, since if $Av=\lambda v$ then: $$BP^{-1}v=P^{-1}APP^{-1}v=P^{-1}Av=\lambda P^{-1}v$$ But if you look at $A-2I$ in your case, one has rank $1$ while the other has rank $2$, which means the first matrix has only $1$ eigenvector for $\lambda=2$ and the secone one has $2$ indepentent eigenvectors for $\lambda=2$. Hence, they cannot be similar.