If x1 and x2 are the roots of the equation x2+px+q=0, then by Viete's formulas we obtain
{x1+x2=−px1x2=q
Because 198=p+q=−(x1+x2)+x1x2=(x1−1)(x2−1)−1, it follows that (x1−1)(x2−1)=199. Since x1,x2 are integers and x1−1,x2−1 are integers and 199 is a prime number
{x1−1=1x2−1=199 or {x1−1=−1x2−1=−199
The solution (x1,x2) of the system is (2,200) and (0,198). From (2,200), we have p=−202, q=400, x1=2, x2=200, and from (0,198), p=−198, q=0, x1=0, x2=198.