9a.
Do \(P\left(-2\right)=7\)
\(\Rightarrow a.\left(-2\right)+5=7\)
\(\Rightarrow-2a=2\)
\(\Rightarrow a=-1\)
b.
Do \(P\left(0\right)=-2\)
\(\Rightarrow a.0+b=-2\)
\(\Rightarrow b=-2\)
Do \(P\left(-3\right)=-1\)
\(\Rightarrow a.\left(-3\right)+b=-1\)
\(\Rightarrow-3a-2=-1\)
\(\Rightarrow-3a=1\)
\(\Rightarrow a=-\dfrac{1}{3}\)