Question

$$A=(\begin{matrix}x&2\\ -7&6\end{matrix}),; B=(\begin{matrix}12&2\\ -7&21\end{matrix}),; 2A^{2}-5A+7E=B.$$