Answer
a. $k=5$
b. $k = \frac{4}{3}$
Work Step by Step
a. Note that $\lim_{x \to 1^-} f(x) = f(1) = 5$. For $f(x)$ to be continuous, $\lim_{x \to 1^+} f(x) = 5$. Thus, $\lim_{x \to 1^+} f(x) = k = 5$. Therefore $k=5$.
b. Note that $\lim_{x \to 2^-} f(x) = f(2) = 4k$. For $f(x)$ to be continuous, $\lim_{x \to 2^+} f(x) = 4+k$ must equal $\lim_{x \to 2^-} f(x) = f(2) = 4k$. Thus, $4+k = 4k$ and $k = \frac{4}{3}$.