Answer
k=4
Work Step by Step
f is continuous at 2 if and only if
$\lim\limits_{x \to 2^{-}}f(x)=\lim\limits_{x \to 2^{+}}f(x)= f(2)$
This implies that
$\lim\limits_{x \to 2^{-}}m(x+1)+k=\lim\limits_{x \to 2^{+}}x^{2}+5= f(2)$
Or 3m+k= 9 $\;\>\;\>\>...(1)$
f is continuous at -1 if and only if
$\lim\limits_{x \to -1^{-}}f(x)=\lim\limits_{x \to -1^{+}}f(x)= f(-1)$
$\implies \lim\limits_{x \to -1^{-}}2x^{3}+x+7=\lim\limits_{x \to -1^{+}}m(x+1)+k= f(-1)$
Or k=4 $\>\>\>\>...(2)$
From equations (1) and (2), we get
$3m+4=9$ or $m=\frac{5}{3}$