Let the common root of the equations x^2 - px + q = 0 and x^2 - ax + b = 0 be alpha. Let the other root of the first equation be beta, making the roots of the second equation alpha and 1/beta. From the first equation, the sum of roots gives alpha + beta = p and the product gives alpha*beta = q. From the second equation, the sum of roots gives alpha + 1/beta = a and the product gives alpha/beta = b. Solving alpha = b*beta from the product equation and substituting into the sum equations yields beta = p/(b+1), which means alpha = bp/(b+1) and 1/beta = (b+1)/p. Substituting these values into the sum alpha + 1/beta = a gives bp/(b+1) + (b+1)/p = a, so we isolate the term (b+1)/p to get (b+1)/p = (a - bp)/(b+1). Squaring both sides and multiplying by bq produces bq*(a - p)^2 = bq*(bp/(b+1) - a)^2. The result is bq*(p - a)^2.