Concept:
For a function \( f(x) \) to be continuous at a specific point \( x = c \), the limiting value of the function as \( x \) approaches \( c \) must exist and be exactly equal to the value of the function evaluated at \( c \):
\[
\lim_{x \rightarrow c} f(x) = f(c)
\]
Step 1: Calculate the limit of \( f(x) \) as \( x \rightarrow -1 \).
We evaluate the limit using the branch defined for \( x \neq -1 \):
\[
\lim_{x \rightarrow -1} f(x) = \lim_{x \rightarrow -1} \frac{x^2 - 4x - 5}{x + 1}
\]
Direct substitution of \( x = -1 \) leads to an indeterminate form of type \( \frac{0}{0} \):
\[
\frac{(-1)^2 - 4(-1) - 5}{-1 + 1} = \frac{1 + 4 - 5}{0} = \frac{0}{0}
\]
Step 2: Factorize the numerator expression to simplify.
Let us factorize the quadratic polynomial expression in the numerator:
\[
x^2 - 4x - 5 = x^2 - 5x + x - 5 = x(x - 5) + 1(x - 5) = (x + 1)(x - 5)
\]
Substitute this back into our limit calculation:
\[
\lim_{x \rightarrow -1} \frac{(x + 1)(x - 5)}{x + 1}
\]
Since \( x \rightarrow -1 \), \( x \neq -1 \), meaning \( x + 1 \neq 0 \). Thus, we can safely cancel the common factor \( (x + 1) \) from both the numerator and the denominator:
\[
\lim_{x \rightarrow -1} (x - 5)
\]
Step 3: Evaluate the simplified limit expression.
Now substitute \( x = -1 \) into the remaining reduced factor expression:
\[
\lim_{x \rightarrow -1} (x - 5) = -1 - 5 = -6
\]
Step 4: Use the continuity condition to find \( k \).
For continuity at the point \( x = -1 \), we must have:
\[
\lim_{x \rightarrow -1} f(x) = f(-1)
\]
From the piece-wise definition, \( f(-1) = k \). Therefore:
\[
-6 = k \implies k = -6
\]