verbatim, the exercise states "A C1 immersion f:M ~ N which is injective on a closed subset K c M is injective on a neighborhood of K." This is well-known for $K$ compact. If we instead assume that $f\vert_K$ is a topological embedding, I also know this to be true (under even weaker hypothesis, from which I can prove an inverse function theorem even more general than what I've seen any textbook state).
But just injectivity feels insufficient. Consider the projection $\mathbb{R}^2\rightarrow T^2$. This is injective on a line with irrational slope (which is closed), but I don't think it shoul…