I did the long division, and assuming the quotient has no remainder, i get k = -11.

Code:

x^3 - 2x^2 + 4x + (k+6)
.............------------------------------------
x^2-x+1 | x^5 - 3x^4 + 7x^3 + kx^2 + 9x - 5
x^5 - x^4 + x^3
..............------------------------------------
-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
...............................--------------------------
(k+6)x^2 + 5x - 5
....................................... (k+6)x^2 - (k+6)x +(k+6)
-------------------------

last line ...

k+6 = -5

k = -11