Hello, I was hoping someone could help me with this question.

Prove that the matrices

$\displaystyle A = \begin{bmatrix} -14 & -27 & -24 \\ 4 & 9 & 6 \\ 6 & 10 & 11 \end{bmatrix} $ and $\displaystyle B = \begin{bmatrix} 1 & 1 & 1\\ 0 & 2 & 1 \\ 0 & 0 & 3\end{bmatrix}$

are similar, and find an invertible matrix $\displaystyle P$ such that $\displaystyle P^{-1}AP = B$.

[Hint: There is no need to work out the characteristic polynomial of A as similar matrices have the same characteristic polynomial. Show that each of the matrices A,B is similar to the same diagonal matrix.]

I worked out that B was similar to diag (1,2,3) by calculating the eigenvectors but I have no idea how to show now that A is similar to diag (1,2,3) without calculating the characteristic polynomial and working out all the eigenvectors. Is it enough that the trace of A and the trace of B, as well as the determinant of A and the determinant of B, are equal?