The first step to solve the division of two polynomials is to determine the highest order term of each, numerator and denominator, and to divide it.
In the present case, we first divided 5n³ by n, which resulted in 5n². This
results in the 5n³ -40n², which is subtracted from the polynomial we are dividing. From this, this results in the new division n² -12n +41 / (n-8), and because the numerator has higher order than the denominator, we repeat the first step, which will be n² / n which implies in +n, and now we subtracted
n² -8n from the numerator, resulting -4n +41, which will be divided by n -8.
Resulting in 5n² +n -4, with the rest of 9.