If x = -4 is a root of f(x), then dividing f(x) by x + 4 leaves a remainder of 0.
Compute the quotient,
(x³ - kx + 12) / (x + 4)
x³ = x² • x, and
x² (x + 4) = x³ + 4x²
Subtract this from the dividend (f(x)) to get an initial remainder of
(x³ - kx + 12) - (x³ + 4x²) = -4x² - kx + 12
-4x² = -4x • x, and
-4x (x + 4) = -4x² - 16x
Subtract this from the previous remainder to get a new one of
(-4x² - kx + 12) - (-4x² - 16x) = (16 - k) x + 12
(16 - k) x = (16 - k) • x, and
(16 - k) (x + 4) = (16 - k) x + 64 - 4k
which gives the next remainder,
((16 - k) x + 12) - ((16 - k) x + 64 - 4k) = 4k - 52
4k - 52 does not divide x, so we're done and what we've shown is
f(x) / (x + 4) = x² - 4x + 16 - k + (4k - 52)/(x + 4)
(just gathering the bold terms above and the last remainder)
The remainder should be 0, so that
4k - 52 = 0
4k = 52
k = 13