Q:

Are identical eigenvalues sufficient for matrix similarity of diagonizable matrices?

Given two diagonizable matrices $A$ and $B$ with identical eigenvalues (and therefore determinants, traces and ranks) that do not commute, is this sufficient to claim $\exists P: B = P^{-1}AP$

A:

Consider the eigen-system of $A$, i.e. ${\lambda_i, v^{(A)}_i}$ such that $A.v^{(A)}_i = \lambda_i v^{(A)}_i$. Consider a matrix $T_A = \left\{v^{(A)}_1, \ldots, v^{(A)}_n\right\}$. Then $A.T_A = T_A.D$, where $D$ is the diagonal matrix is the equivalent notation for collection of equations $(A.T_A)_{j, i} = (A.v^{(A)}_i)_j = \lambda_i (v^{(A)}_i)_j = (T_A.D)_{j,i}$. Similarly $B.T_B = T_B.D$.
Assuming $T_B$ and $T_A$ are invertible, it follows $D = T_B^{-1}.B.T_B = T_A^{-1}.A.T_A$, and $B=(T_A.T_B^{-1})^{-1}.A.(T_A.T_B^{-1})$.
But not all matrices have the complete set of eigen-vectors, i.e. $T_A$ or $T_B$ can be degenerate.
Consider matrix $D_1 = \left(
\begin{array}{ccc}
 4 & 1 & 0 \\
 0 & 4 & 0 \\
 0 & 0 & 1 \\
\end{array}
\right)$ and $D_2 = \mathrm{diag}(4,4,1)$. Also let $s_1=\left(
\begin{array}{ccc}
 -1 & 1 & 1 \\
 1 & 1 & -1 \\
 0 & 2 & 2 \\
\end{array}
\right)$, $s_2 = \left(
\begin{array}{ccc}
 1 & -1 & 0 \\
 2 & 1 & 0 \\
 -2 & -2 & 2 \\
\end{array}
\right)$. 
Now define $A = s_1.D_1.s_1^{-1}$ and $B=s_2.D_2.s_2^{-1}$. 
$$
   A = \left(
\begin{array}{ccc}
 5 & 1 & -\frac{3}{2} \\
 -1 & 3 & \frac{3}{2} \\
 3 & 3 & 1 \\
\end{array}
\right) \quad \quad  B = \frac{1}{3} \left(
\begin{array}{ccc}
 10 & 1 & 0 \\
 -4 & 14 & 0 \\
 10 & -14 & 3 \\
\end{array}
\right)
$$
These matrices have the same eigenvalues, i.e. $\left\{4, 4, 1\right\}$, they do not commute, but they are not similar, because their Jordan normal forms are different.

