a) Ta có: \(f\left(-1\right)=0\Rightarrow a-b-2=0\Rightarrow b=a-2\)
Lại có: \(f\left(2\right)=0\Rightarrow4a+2b-2=0\)
\(\Rightarrow4a+2\left(a-2\right)-2=0\Rightarrow6a-6=0\)
\(\Rightarrow a=1\Rightarrow b=-1\)
b) \(C=A-B\)
\(\Rightarrow C=\left(x^2-10xy+2017y^2+2y\right)-\left(5x^2-8xy+2017y^2+3y-2018\right)\)
\(\Rightarrow C=-4x^2-2xy-y+2018\)
Do \(2x+y=1\Rightarrow y=1-2x\)
\(\Rightarrow C=-4x^2-2x\left(1-2x\right)-\left(1-2x\right)+2018\)
\(\Rightarrow C=-4x^2-2x+4x^2-1+2x+2018\)
\(\Rightarrow C=2018-1=2017\)