Firstly, you divide 3x^33x3 by xx to get 3x^23x2. Then you do 3x^2(x+5)=3x^2+15x^23x2(x+5)=3x2+15x2.
3x^3+12x^2-3x^3-15x^2=-3x^23x3+12x2−3x3−15x2=−3x2, the first value of the quptient is 3x^23x2.
Now you do (-3x^2)/x=-3x−3x2x=−3x. Then you do -3x(x+5)=-3x^2-15x−3x(x+5)=−3x2−15x.
(3x^2-21x)-(-3x^2-15x)=-21x+15x=-6x(3x2−21x)−(−3x2−15x)=−21x+15x=−6x. -3x−3x is the second part of the quotient.
Now you do (-6x)/x=-6−6xx=−6. Then you do -6(x+5)=-6x-30−6(x+5)=−6x−30.
(-6x-23)-(-6x-30)=-23+30=7(−6x−23)−(−6x−30)=−23+30=7. -6−6 is the last part of the quotient. 77 is the remainder.
Visual guide:
" "3x^2-3x-6 3x2−3x−6 rr 77
(x+5)"/"(3x^3+12x^2-21x-23)(x+5)/(3x3+12x2−21x−23)
" "-(3x^3+15x^2) −(3x3+15x2)
" "(0-3x^2) (0−3x2)
" "-(-3x^2-15x) −(−3x2−15x)
" "(0-6x) (0−6x)
" "-(-6x-30) −(−6x−30)
" "(0+7) (0+7)