How to find invertible matrix $P$ Such that $B=P^{-1}AP$ 
Let $A,B$ be the two $3 \times 3$ matrices
$$A=\begin{bmatrix}
3 & 2 &-5\\2 &6&-10\\1 &2 & -3 \end{bmatrix}$$
$$B=
\begin{bmatrix}
6 &20 &-34\\6 &32&-51\\4 &20 &-32 \end{bmatrix}
$$
Suppose that there is a Non Singular matrix $P$ that $P^{-1}AP=B$. Find $P$

My idea is using Eigen Values we get Diagonilization of Matrices $A$ and $B$ as:
$$A=RD_AR^{-1}$$
$$B=QD_BQ^{-1}$$
Then we get:
$$QD_BQ^{-1}=P^{-1}RD_AR^{-1}P$$
But i feel this is very tedious procedure?

If you want, you can do it by solving a single explicit 9 by 9 system (also tedious but straightforward!).
Indeed, call $p_i =Pe_i$. Note that $p_i^l =P_{il}$ cause we are using standard basis vectors. Here $p_i^l$ denotes the $l$ component of $p_i$. 
We have $A=PBP^{-1}$. Applying these matrices to $p_i$ and taking the k-th component we get:


*

*LHS: $(Ap_i)_k = \sum A_{kl} p_i^l$

*RHS: $(PBe_i)_k = (P\sum B_{ij} e_j)_k = (\sum B_{ij} Pe_j)_k = \sum B_{ij} p_j^k$
By equating LHS and RHS we get 9 equations (varying $i,k$) in 9 variables (the $p_i^l$'s). As far as I know, you should solve 6 linear system 3x3 to find the eigenvectors, so this should be faster.
