If a and b are not both zero, the greatest common divisor of a and b can be computed by using least common multiple (lcm) of a and b:
Thus If GCD = HCF= (2x-1) and LCM = 6x3+25x2-24x+5
p(x)=2x2+9x-5, then q(x) is
q(x) = (2x-1) * ( 6x3+25x2-24x+5 ) / 2x2+9x-5
Now factorize the terms to get the results