To determine the value of \( k \) in the function \( g(y) = y + k \) that describes the translation from the point \( (4, -1) \) to the point \( (4, 2) \), we first consider the change in the \( y \)-coordinate.
The original point has a \( y \)-coordinate of \(-1\), and the new point has a \( y \)-coordinate of \(2\). The translation can be described as:
\[ y + k = 2 \]
We can set up the equation with the original \( y \)-coordinate:
\[ -1 + k = 2 \]
Now, solve for \( k \):
\[ k = 2 + 1 \] \[ k = 3 \]
Thus, the value of \( k \) is \( 3 \). The correct answer is:
B. \( 3 \)