Tenemos $P(x)=x^3-ax^2+7x+b$ Aplicamos el Teorema del resto
Si es divisible por $(x-5)$ entonces $P(5)=0$
Si da un resto de 9 al dividir por $(x-2)$ entonces $P(2)=9$
$P(5)=0 \longrightarrow 5^3-a \cdot 5^2+7 \cdot 5+b = 0 \longrightarrow \colorred125-25a+35+b=0$ $P(2)=9 \longrightarrow (…)