What does it mean for a function to be decidable? (homework)
They are not asking to prove that the function $g$ is decidable, but the image $g(\mathbb{N})$ is decidable. The image is a subset of $\mathbb{N}$, namely
$$g(\mathbb{N}) = \{ k \in \mathbb{N} \mid \exists n \in \mathbb{N} . g(n) = k \}.$$
The question reduces to showing decidability of "given $k$, does there exist $n \in \mathbb{N}$ such that $g(n) = k$?".