First, suppose that $i:K \hookrightarrow M$ is an insertion in some concrete category $\mathcal{C}$, and that we have some morphism $f:T \to M$ such that $f(T) \subseteq K \subseteq M$. It seems to me evident (from the standard definitions of function, subset, insertion, etc.) that there is a morphism $g:T \to K$ such that $i \circ g = f$, the only difference between $f$ and $g$ being that $\mathrm{cod}(f) = M$ while $\mathrm{cod}(g) = K$. But how does one prove the existence of $g$ categorically? (I imagine that the key to this lies in casting the definitions of insertion and $f(T) \subseteq K$ in categorical language.) How would the statement of the theorem have to be changed so that it holds for an arbitrary category? (E.g. I imagine that $i:K \to M$ would be described merely as a monomorphism, rather than an insertion.)
Second, what does one call a function like $g$, which differs from another function $f$ in codomain only? Is there a general category-theoretical name for the relationship between morphisms $g$ and $f$ in this example?
(This reminds me of how one gets a function $h|_Y$ by restricting the function $h$ to some subset $Y$ of $\mathrm{dom}(h)$. Here, instead, I want to "restrict" the codomain.)
Thanks!
PS: I have been studying a bit of CT in my spare time for some weeks: IOW, I'm a rank noob! I know what (co)products are, and have a very fuzzy understanding of pullbacks/pushouts and (co)limits...