Ta có: \(f\left(1\right)=g\left(1\right)\Rightarrow a.1+b=2.1^2+1+7\Rightarrow a+b=10\) (1)
\(f\left(2\right)=g\left(-2\right)\Rightarrow a.2+b=2.\left(-2\right)^2+\left(-2\right)+7\Rightarrow2a+b=13\) (2)
Từ (1) và (2) \(\Rightarrow2a+b-a-b=13-10\Rightarrow a=3\Rightarrow3+b=10\Rightarrow b=7\)
Vậy a=3; b=7