I am trying to prove the statement: A morphism $f:Y \rightarrow X$ of schemes is determined locally by homomorphisms of rings.
Here is my attempt:
Given the morphism $f:Y \rightarrow X$ and any point $y \in Y$. Consider $f(y) = x \in X$, there is an affine neighborhood $U = \mathrm{Spec}\: A \subset X$ containing $x$. There is also an affine neighborhood $V = \mathrm{Spec}\: B \subset f^{-1}(U)$ containing $y$. Restricting the map $f$ we have a map $f:V \rightarrow U$ which is determined by the corresponding ring homomorphism $f^* : A \rightarrow B$.
So we have shown that for any point in $Y$ there is a neighborhood on which the map is determined by a map of rings.
Is this ok? I think I have confused myself pretty badly. Maybe it is just the poor presentation of my proof.