In Hartshorne's "Algebraic Geometry" the projective scheme $\mathbb{P}^n _R$ is introduced as representating object of the functor $$F: (Sch/R) \to (Set),$$ $$X \mapsto \{(\mathcal{L},s) \vert \mathcal{L} \text{ invertible sheaf on } X, s := (s_0, s_1, ... , s_n): \mathcal{O}_X ^{\oplus n+1} \to \mathcal{L}, s \text{ surjective}\} / \cong$$
here "$\cong$" means the equivalence relation $(\mathcal{L},s) \sim (\mathcal{L}',s') $ iff there exist an iso $t: \mathcal{L} \to \mathcal{L}'$ of sheaves such that $s' = t \circ s$ (compare with Thm. 7.1, page 150).
Therefore one has a natural transformation $Hom_{Sch/R}(-, \mathbb{P}^n _R) \to F$, such that for every $X \in (Sch/R)$ there exists a natural compatible bijection
$$ Hom_{Sch/R}(X, \mathbb{P}^n _R) \to \{(\mathcal{L},s) \vert ... \text{as above} \} / \cong$$
This arises as follows:
Let $f:X \to \mathbb{P}^n _R$ a morphism, $S := R[x_0, x_1, ..., x_n]$. Therefore one has the canonical morphism $$t := (x_0, x_1, ..., x_n): \mathcal{O}_{\mathbb{P}^n} ^{\oplus n+1} \to \mathcal{O}_{\mathbb{P}^n}(1)$$.
Applying the inverse image functor $f^*$ defined via $f^{*}{\mathcal {G}}:=f^{-1}{\mathcal {G}}\otimes _{f^{-1}{\mathcal {O}}_{Y}}{\mathcal {O}}_{X}$ one gets the morphism
$$s := (s_0, s_1, ..., s_n): \mathcal{O}_X ^{\oplus n+1} \to f^*(\mathcal{O}_{\mathbb{P}^n}(1)) =: \mathcal{L}$$
with $s_i = f^*(x_i)$ as $f^*$ functorial. This defines the map $a:f \to (\mathcal{L},s)$.
As one wants to show the bijectivity we have to construct a map in inverse direction:
Assume $s := (s_0, s_1, ... , s_n): \mathcal{O}_X ^{\oplus n+1} \to \mathcal{L}$ is surjective. Then $s_i$ can be interpreted as global sections $s_i \in \Gamma(X, \mathcal{L})$, but also as morphisms $s_i: \mathcal{O}_X \to \mathcal{L}$. Because $s$ is surjective, $\mathcal{L}$ is globally generated, so one get the covering $X= \bigcup X_i$ with $$X_i:= X_{s_i} = \{a \in X \vert (s_i)_a \neq 0\}$$.
Therefore the restriction of $s_i$ to $X_i$ is bijective.
Let $U_i := D_+(x_i) = Spec(R[x_0/x_i, x_1/x_i, ..., x_n/x_i])$, then as Hartshorne explains, this gives rise to partially defined morphisms $$f_i: X_i \to U_i= Spec(R[x_0/x_i, x_1/x_i, ..., x_n/x_i])$$
defined as corresponding to the ring homorphism $\phi_{f_i}:R[x_0/x_i, x_1/x_i, ..., x_n/x_i] \to \Gamma(X, \mathcal{O}_X), x_j/ x_i \to (s_j|_{U_i})/ (s_i|_{U_i})$. Obviously these morphisms can be glued together to a morphism $f: X \to \mathbb{P}^n _R$ and one gets the map $b:(\mathcal{L},s) \to f$.
I have following two questions:
It is not clear to me why $(s_j|_{U_i})/ (s_i|_{U_i}) \in \Gamma(X_i,\mathcal{O}_X)$.
How can I see that the maps $a$ and $b$ are inverse to each other? Why, if we start with arbitrary $f: X \to \mathbb{P}^n _R$ and get via $a$ $\mathcal{L} = f^*(\mathcal{O}_{\mathbb{P}^n}(1))$ and $s=(f^*(x_0, ..., f^*(x_n))$ as explained above, do we get via $b$ the same f back?