Ta có: \(\orbr{\begin{cases}f\left(1\right)=a+b\\f\left(-2\right)=-2a+b\end{cases}}\)
Tương tự: \(\orbr{\begin{cases}g\left(2\right)=3\\g\left(1\right)=1\end{cases}}\)
Mặt khác \(f\left(1\right)=g\left(2\right)\)và \(f\left(-2\right)=g\left(1\right)\)
Suy ra: \(\hept{\begin{cases}a+b=3\\-2a+b=1\end{cases}\Rightarrow a+b=-2a+b+2\Rightarrow a=-2a+2\Leftrightarrow a=\frac{2}{3}}\)
Suy ra: \(b=\frac{7}{3}\)