Find the value of k using long division

Hello guys, I'm really stuck with this question in my assignment. I just wondering if you can give me an idea how to solve K using long division. Here is the function.

F(x) = x^5 - 3x^4 + 7x^3 + Kx^2 + 9x - 5; d(x) = x^2 - 1 +1

What I did here is I divided F(x) by D(x). But I dont know what to do with the K.

Thanks in advance. :)

Find the value of K using long division

My divisor should be d(x) = x^2 - x +1

Solving for K using a long division

Thank you very much for helping me.(Clapping) I just wanna clarify something. How did you get **(k+2)x^2** .

2x^4 + 6x^3 + kx^2 + 9x - 5

-2x^4 + 2x^3 - 2x^2

--------------------------------

4x^3 + **(k+2)x^2** + 9x - 5

4x^3 - 4x^2 + 4x

Solving for K using a long division

On the last line

(k+6)x^2 + 5x-5

__ (k+6)x^2 - (k+6)x + (k+6)__

how did you arrived this "k+6 = -5"

Thanks you for your patience. (Bow)