Divide #x^3 + 5x^2 + x - 15 # by #x+3#.
First, you let the coefficients of each degree to be used in the division (#1, 5, 1, -15#).
Then, dividing by #x+3 = x - (-3)# implies that you use #-3# in your upper left. So, put #-3#, then a line (I've used a double line), and then write #" 1" " 5" " 1" " -15 "# to the right.
#"-3 " ||# #"1 " " 5 " " 1" " -15"#
#+#
#" " " "##-----#
First, bring the first #1# down to the bottom, and multiply it by the #-3#. Put that #-3# below the #5#.
#"-3 " ||# #"1 " " 5 " " 1" " -15"#
#+# #" "" " " -3"#
#" " " "##-----#
#" "" " " 1"#
Then add #5+(-3) = 2# Put that under the #-3#
#"-3 " ||# #"1 " " 5 " " 1" " -15"#
#+# #" "" " " -3"#
#" " " "##-----#
#" " " " " 1 " " 2"#
Multiply #-3 xx 2 = -6# and put the #-6# under the #1#. Then add:
#"-3 " ||# #" 1 " " 5 " " 1 " " -15"#
#+# #" "" " " -3 " " -6"#
#" " " "##--------#
#" " " " " 1 " " 2 " " -5"#
Now #-3 xx -5 = 15#, so we put #15# under #-15 and add::
#"-3 " ||# #"1 " " 5 " " 1 " " -15"#
#+# #" "" ""-3 " " -6 " " 15"#
#" " " "##--------#
#" "" " " 1 " " 2 " " -5 " " 0 "#
The bottom row ignoring the last number gives us the coefficients of the quotient.
The last number on the bottom row is the remainder (and it is also #P(-3)#).
So the division gives us:
#(x^3 + 5x^2 + x - 15)/(x+3) = x^2+2x-5#
You can check the answer by multiplyng:
#(x+3)(x^2+2x-5)# to make sure we get #x^3 + 5x^2 + x - 15#.
(I've used Synthetic Division Formatting by Truong-Son R.)