Since x−k is the HCF of polunomials p(x) and q(x), it is common factor of polynomials p(x) and q(x). Hence p(k)=0 and q(k)=0. Putting x=k, we get
0p(k)=k2+3k−10, 0=q(k)=2k2−k2−4.
The second relation gives k2=4 or k=±2. If k=−2, we get
p(−2)=(−2)2+3(−2)−10=−12.
Since p(k)=0, k≠−2. Taking k=2, we may verify that p(2)=22−3(2)−10=0.
Thus k=2.