In example 2.3.5 Hartshorne says
Let $X_1$ and $X_2$ be schemes. Let $U_1 \subseteq X_1$ and $U_2 \subseteq X_2$ be open subsets, and let $\varphi: ( U_1, \mathcal{O}_{X_1 \mid U_1}) \to ( U_2, \mathcal{O}_{X_2 \mid U_2})$ be an isomorphism of locally ringed spaces. Then we can define a scheme $X$, obtained by glueing $X_1$ and $X_2$ along $U_1$ and $U_2$ via the isomorphism $\varphi$. The topological space of $X$ is the quotient of the disjoint union $X_{1} \cup X_{2}$ by the equivalence relation $x_{1} \sim \phi (x_1)$ for each $x_1 \in U_{1}$, with the quotient topology. Thus there are maps $i_1 : X_1 \to X$ and $i_2: X _{2} \to X$ , and a subset of $V \subseteq X$ is open iff $i_1 ^{-1}(V)$ is open in $X_1$ and $i_2^{-1}(V)$ is open in $X_2$. The structure sheaf $\mathcal{O}_X$ is defined as follows: for any open set $V\subseteq X$,
$$\mathcal{O}_{X}(V) = \left \{ \langle s_{1}, s_{2}\rangle\mid s_1 \in \mathcal{O}_X (i_1 ^{-1}(V)) \text{ and } s_2 \in \mathcal{O}_X (i_{2} ^{-1}(V)) \text{ and } \varphi(s_1|_{i_1^{-1}(V)) \cap U_1})= s_2|_{i_2^{-1}(V)) \cap U_2} \right\}$$
I'm unable to interpret the $\varphi(s_1|_{i_1^{-1}(V)) \cap U_1})= s_2|_{i_2^{-1}(V)) \cap U_2} $ part. I'm even unclear about where does this $\varphi$ come from. (I think this $\varphi$ can not be the same as the usual morphism $\varphi^{\#}$ of sheaves of rings on $U_2$).