Let $A$ be a square matrix of order $n$ over $\mathbb{R}$ such that $A^2-3A+I_n=0_n$. Then $A^{-1}=3I_n-A$.
The answer given is true.
Suppose $A^{-1}$ exists. Then $A^{-1}(A^2-3A+I_n=A^{-1}(0_n)$ which implies $A-3I_n+A^{-1}=0_n$. So clearly, $A^{-1}=3I_n-A$.
But I can't show that the inverse of $A$ exists.

$$ 3A-A^2 = I_n \implies (3I_n-A)A =I_n \implies 3I_n-A = A^{-1} $$
Also, $$ 3A-A^2 = I_n \implies A(3I_n-A) =I_n \implies 3I_n-A = A^{-1} $$
So the inverse of $A$ exists, it is both a right and left inverse.