The notion you have defined is called a localizing morphism in [Nayak, Definition 2.1], at least for morphisms between noetherian schemes. Nayak points out that this definition has some peculiar features. For example, if $Y$ is a noetherian scheme, then we can have the following [Nayak, (2.4)]:
- Let $X$ be the scheme obtained by gluing two open sets $U \subseteq Y$ and $V \subseteq Y$ along a nonempty open subset in $U \cap V$. Then, $X \to Y$ is a localizing morphism that is not separated in general.
- Let $\{U_i\}$ be a finite collection of open subsets of $Y$, and let $X = \coprod_i U_i$. Then, the natural map $X \to Y$ is a localizing morphism that is separated, but is not an open immersion in general.
This is why Nayak defines a localizing immersion between noetherian schemes as a localizing morphism that is set-theoretically injective, or equivalently a localizing morphism that is separated and maps generic points to generic points [Nayak, Lemma 2.6 and Definition 2.7].
You can read about some properties of localizing immersions in [Nayak, (2.8)], but one of the most important results is the following:
Theorem [Nayak, Theorem 3.6]. Let $f\colon X \to S$ be a separated morphism essentially of finite type between noetherian schemes. Then, $f$ factors as
$$X \overset{k}{\longrightarrow} Y \overset{p}{\longrightarrow} S,$$
where $k$ is a localizing immersion and $p$ is separated and of finite type.
Nayak uses this result to obtain a version of Nagata's compactification theorem for separated morphisms essentially of finite type.
Theorem [Nayak, Theorem 4.1]. Let $f\colon X \to S$ be a separated morphism essentially of finite type between noetherian schemes. Then, $f$ factors as
$$X \overset{k}{\longrightarrow} Y \overset{p}{\longrightarrow} S,$$
where $k$ is a localizing immersion and $p$ is proper.
Nayak also obtains versions of Zariski's main theorem [Nayak, Theorem 4.3], Chow's lemma [Nayak, Theorem 4.8], and Grothendieck duality [Nayak, Theorem 5.3] for separated morphisms essentially of finite type.
You can observe that
$O_X(X)\cong A$
where $O_X(X)$ is the Space of the global section of $X$.
Then if you have a morphism of scheme
$(f,f^*): (X,O_X)\to (Y, O_Y)$
you get a morphism
$f^*(A): O_X(X)\cong A\to (f_*O_Y)(A)\cong B$
This is the unique morphism which induces exactly $(f,f^*)$.
In fact if $\phi: A\to B$ is a morphism of ring which induces $(f,f^*)$, then for each $a\in A$, if we denote with $a^\sim\in O_X(X)$ the global constant section of $a$, we get
$f^*(a^\sim)=\phi(a)^\sim$
so, up to isomorphism of $O_X(X)\cong A$, one get
$f^*(a)=\phi(a)$
Best Answer
Your solution is essentially correct. One thing to note is that $f_\rho$ is not a scheme morphism as it is written; it does not mention the action on the ringed structures of $X$ and $Y$.
The global section of the map $i^\#: \mathcal{O}_X \to i_*\mathcal{O}_Y$ is precisely $\rho_{X,Y}: A \to B$ so that by the proof of Liu's Lemma 2.3.23, $i$ and $f_\rho$ are the same map on sets $\operatorname{Spec} B \to \operatorname{Spec} A$. As a map on sets, $i$ is assumed to be injective so we're done. This is pretty much your solution.
The confusing thing here is that we're identifying $Y$ with the set $\operatorname{Spec} B$, which is somewhat of an abuse of notation. There is no harm in this (it is very standard and helpful abuse) but if you wanted to be very explicit, you could fix an isomorphism $Y \to \operatorname{Spec} B$.