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!

Here is an other possibility to proceed. The Romanian NMO "should not know" the linear algebra related to diagonalization and/or Jordan forms for matrices, but for $2\times 2$ matrices it is a standard idea to use Cayley-Hamilton, since having the trace $t$ and the determinant $d$ of a matrix $A$ it is an exercise for matrix operations (theoretically also done in the classes) to check $A^2-tA+d=0$. In this sense, we may work as follows, using as much as possibly the arithmetics of the polynomial ring $\Bbb R[x]$.

The given matrix $A$ with entries $10, 20, 5, 10$ has trace $20$, and determinant zero. Let $g$ be the characteristic polynomial of $A$, so $g(A) = A^2-20A=0$. The unknown matrix $X$ satisfies for the polynomial $f(x)=x^3-4x^2+5x$ the given relation $f(x)=A$. So 
$$
\begin{aligned}
h(x):=g(f(x))
&=x^2(x^2 - 4x + 5)^2 - 20x(x^2 - 4x + 5)
\\
&=(x^2 - 4x + 5)(x^2 + 5)(x - 4)x
\end{aligned}
$$
annihilates $X$. 
Let $p\in\Bbb R[x]$ be the (monic) minimal polynomial of $X$. 
It has degree two, (else we get a contradiction with $f(X)=A$,) so it divides $h$. 


*

*The first factor is excluded immediately as a value for $p$, because this would imply $A=f(X)=Xp(X)=0$. 

*The second factor is also excluded as a value for $p$,  because else $f(x)-20=(x^2+5)(x-4)$ has the factor $(x^2+5)$, so $A-20I=(f-20)(A) =0$, again a contradiction.

*It follows $p(x)=x(x-4)=x^2-4x$. The rest obtained by division with rest of $f(x)=\color{gray}{x^3-4x^2}+5x$ by $p(x)=x^2-4x$ is $5x$, so we obtain:
$$
A=f(X)=5X\ .
$$
This brings the only matrix operation in the game
$$
X=\frac 15A=\begin{bmatrix}2&4\\1&2\end{bmatrix}\ .
$$
