Find all real matrices such that $X^{3}-4X^{2}+5X=\begin{pmatrix} 10 & 20 \\ 5 & 10 \end{pmatrix}$ The following question come from the 1998 Romanian Mathematical Competition:

Find all matrices in $M_2(\mathbb R)$ such that $$X^{3}-4X^{2}+5X=\begin{pmatrix} 10 & 20 \\ 5 & 10 \end{pmatrix}$$

Can you guy please help me? Thanks a lot!

Let $p$ be the polynomial in question and $R$ be the right hand side. Note that $R$ is equivalent to $D=\operatorname{diag} (20,0)$.
Let $V^{-1}RV = D$, then since $V^{-1}p(X)V = p(V^{-1}XV) = D$, we can look for solutions
to $p(X)=D$ and then conjugate back to get the original solutions.
Note that $De_1 = 20 e_1, D e_2 = 0$. Hence $p(X)e_1 = 20e_1$, $p(X)e_2 = 0$.
If $\lambda$ is an eigenvalue of $X$ then $p(\lambda)$ is an eigenvalue of $p(X)$,
hence $X$ has distinct eigenvalues and $p(\lambda_1) = 20, p(\lambda_1) = 0$.
Hence $e_1,e_2$ are eigenvectors of $X$ (this is the key here).
In particular, $X$ is diagonal, so the problem reduces to solving $p(x) = 0$ (roots $0, 2 \pm i$) to get $X_{22}$ and $p(x)=20$ (roots $4,\pm \sqrt{5}i$) to get $X_{11}$ and seeing what combinations work.
Since the matrix is real, we see that $X$ must have roots $4,0$ and so $X = \operatorname{diag} (4,0)$.
To finish, we need to conjugate, if we let 
$V= \begin{bmatrix} 2 & -2 \\ 1 & 1\end{bmatrix}$, then
$V X  V^{-1} = \begin{bmatrix} 2 & 4 \\ 1 & 2\end{bmatrix}$.
