the extended Euclidean algorithm solves a different problem. given P, Q, find A,B,G such that G=A*P+B*Q where G is the GCD of P and Q, and there are suitable constraints on degrees. You asked for the quotient and divisor, as Ray pointed out.