If the equation x2+px+q=0 and x2+qx+p=0 have exactly one root in common, then equation with other roots is
x2+x+pq=0
Given: x2+px+q=0 and x2+qx+p=0 have one root common.
Let the common root be α.
⇒α2+pα+q=0 and α2+qα+p=0
Applying the condition of one root common,
α2p2−q2=αq−p=1q−p
⇒α=p2−q2q−p,1
⇒p2−q2q−p=1
⇒p2−q2=q−p
⇒(p−q)[p+q+1]=0
⇒p−q=0 and p+q+1=0
The required equation is x2−(p+q)x+pq=0
⇒ x2+x+pq=0