I can’t really do long division on a phone so, extended techniques are required.
(x^3 - 2x^2 + 6x + 3)/(x-3)
= (x^3 - 3x^2 + (x^2 - 6x + 9)+ 12x - 6)/(x-3)
= (x^2(x-3) + (x-3)^2 + 6(2x - 1))/x-3
= x^2 + x - 3 + 6(2x - 1)/(x-3)
or
= x^2 + x - 3 remainder 12x - 6
or, in the form p(x) = q(x)d(x) + r(x):
(x^3 - 2x^2 + 6x + 3) = (x^2 + x - 3)(x - 3) + (12x - 6)
which implies that the quotient q(x) = (x^2 + x - 3) and remainder r(x) = 12x - 6