Part 1. In the long division, you find the greatest factor that could divide the dividend. You do this one at a time per term. Then, you find the product of the factor and the divisor, then subtract it from the dividend. The cycle goes on until all the terms are divided:
x + 6
----------------------------
x - 9 | x² - 3x + 6
- x² - 9x
-------------------
6x + 6
- 6x - 54
--------------
60
There quotient is (x+6) with a quotient of 60.
Part 2. The steps shown are from the concept of Factor and Remainder Theorem. When you substitute x=a to the function, the answer could determine if x=a is a factor or not. If the answer is zero, then x=a is a factor. If not, the answer represents the remainder.
Therefore, x = 9 is not a factor of the given function. It yields a remainder of 60 which coincides with Part 1.