For what value of,K the factor of x^{2} + x-(2K+2) and 2x^{2} + Kx-12 is x+4?

(1) x^{2}+x-(2K+2)

it has x+4 as factor which means x+4 is a root of this equation so

substituting 4 in the equation will make it 0

16+4-(2K+2)=0

K=9

(2)2x^{2}+ Kx-12 has factor x+4 which means x+4 is a root of this equation so

substituting 4 in the equation will make it 0

2(4)^{2} + K(4)-12 =0

K=5