a. First question mark middle line is -6 (=-3*2);
first ? on bottom line is -9 (=-3-6); bottom line is the quotient, and the middle line is the working out;
next ? on middle line is 27 (=-3*-9);
next ? on bottom line is -18 (=-45+27);
last ? on middle line is 54 (=-3*-18); hence 0 on bottom line, meaning no remainder.
2 -9 -18 is the quotient used as the dividend in part b below:
b. Middle line reads + 6 and 18; bottom line quotient: 2 3 0. This implies 2x+3.
The result of these progressive divisions is to factorise the polynomial (cubic): (x+3)(x-6)(2x+3), using the roots or zeroes -3 and 6. The remaining zero is when 2x+3=0, i.e., x=-3/2.