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

Prove that the matrices

and

are similar, and find an invertible matrix such that .

[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?