You can
put this solution on YOUR website!
Hi
x-2 is a factor of x^3-x^2+kx-2.
2 1 -1 k -2
2 2 2k+4
1 1 k+ 2 0
k = -1 
.........
x-4 is a factor of x^3-k^2x^2-8kx-16
4 1 -k^2 -8k -16
4 16 - 4k^2 -16k^2 - 32k + 64
1 4-k^2 -4k^2 - 8k + 16 0
k = -3,1 
Synthetic Division works well here.