\(q\left(x\right)=x^2-2x-3=\left(x+1\right)\left(x-3\right)\)
\(f\left(x\right)⋮q\left(x\right)\) thì \(f\left(-1\right)=0\) và \(f\left(3\right)=0\)(Theo định lí Bezout)
\(f\left(-1\right)=0\Leftrightarrow1+p+q=0\left(1\right)\)
\(f\left(3\right)=0\Leftrightarrow81+9p+q=0\left(2\right)\)
\(\left(2\right)-\left(1\right)=0\Leftrightarrow\left(81+9p+q\right)-\left(1+p+q\right)=0\Leftrightarrow80+8p=0\)
\(80+8p=0\)
\(8\left(10+p\right)=0\)
\(10+p=0\Leftrightarrow p=-10\Rightarrow q=9\)
Vậy: p=-10; q=9