I need to find the value of K in this soloution. I can't seem to figure it out.

x^2+(2k+1)x+(k^2-5)=0

Secondly, I need to factor

x^3-x^2-12x

First I use 3 as a factor and then I try and use synthetic division..

3 | 1 -1 -12 0

|___3__6 -18___

1 2 -6 -18