First you need a proposition
Proposition 5.12 (c) Let $S$ be a graded ring and let $X = \text{Proj } S$. Assume that $S$ is generated by $S_1$ as an $S_0$ algebra. Let $T$ another graded ring, generated by $T_1$ as a $T_0$ algebra, let $\phi: S\to T$ a morphism preserving degrees, and let $U\subset Y = \text{Proj } T$ and $f: U\to X$ be the morphism determined by $\phi$. Then $f^*(\mathcal{O}_X(n)\cong \mathcal{O}_Y(n)|_U$
Remember that the induced morphism $f$ is $f(\mathfrak{p}) = \phi^{-1}(\mathfrak{p})$ this is well defined because $\phi$ is a graded morphism. Now let me cite a lemma wich you surely have been using but maybe didn't notice
Lemma. $\text{Proj} \, A[x_0,...,x_n] = \text{Proj} \, \mathbb{Z}[x_0,...,x_n] \times_{\text{Spec }\mathbb{Z}} \text{Spec} \, A$
What you need to show is the following
Claim. If $Z=\text{Spec } A$ then the twisting sheaf $\mathcal{O}(1)$ on $\mathbb{P}^r_Z$ is the same as the $\mathcal{O}(1)$ defined on $\mathbb{P}^r_A$
Proof. We are going to show that satisfies the hypothesis of the previous proposition, so let $S=\mathbb{Z}[x_0,\dots,x_r]$ and let $T=A[y_0,\dots,y_r]$ both with the natural graduation. Consider the canonical morphism $\phi: S\to T$ and let $Y=\text{Proj } T$, in this case use $U=Y$. Now $X= \mathbb{P}_\mathbb{Z}^r$ and by the lemma
$$\mathbb{P}^r_Z = \mathbb{P}^r_\mathbb{Z}\times_{\text{Spec }\mathbb{Z}} \text{Spec } A = \text{Proj} \, \mathbb{Z}[x_0,...,x_r] \times_{\text{Spec }\mathbb{Z}} \text{Spec} \, A = \text{Proj } A[x_0,\dots,x_r] = \text{Proj } T = Y$$
Observe that by definition the induced map $f: Y \to X$ is the same as the natural map $g$ used in your second definition, so by the proposition $\mathcal{O}(1) = g^*(\mathcal{O}_X(1)) = f^*(\mathcal{O}_X(1)) = \mathcal{O}_Y(1)$
Let $A$ be a commutative unital ring and let $E:=A\{e_0,..,e_n\}$ be the free $A$-module of rank $n+1$ on the elements $e_i$. Let $E^*:=A\{x_0,..,x_n \}$ be the dual of $E$ and let $S:=Sym_A(E^*)\cong A[x_0,..,x_n]$. Let $\mathbb{P}(\mathcal{E}^*):=Proj(S)$ be the projective space bundle of $\mathcal{E}$ (the sheafification of $E$). There is a canonical exact sequence of graded $S$-modules
$\phi: \oplus_{i=0}^n S x_i \rightarrow S(1) \rightarrow 0$
defined by
$\phi( f_0,f_1,..,f_n):= \sum_{i=0}^n f_i x_i .$
Let $\pi:\mathbb{P}(\mathcal{E}^*) \rightarrow Y$ (here $Y:=Spec(A)$) be the projection map. When sheafifying the map $\phi$ we get the tautological sequence
$\pi^*\mathcal{E}^* \rightarrow^{\phi} \mathcal{O}(1) \rightarrow 0.$
Since $\pi^*\mathcal{E}^*$ is a free $\mathcal{O}$-module it follows this proves the invertible sheaf $\mathcal{O}(1)$ is generated by the global sections $s_i:=\phi(x_i)$.
Lemma: Let $X$ be a scheme. For a surjection $\phi: \mathcal{O}_X \{y_1,..,y_l\} \rightarrow \mathcal{L}$ where $\mathcal{L}$ is an invertible sheaf on $X$ and $\mathcal{O}_X\{y_1,..,y_l\}$ is the free sheaf of rank $l$ on the elements $y_i$, it follows $\phi(y_i)$ are global sections generating $\mathcal{L}$. Conversely given a set of global sections $s_1,..,s_l$ of $\mathcal{L}$ that generated $\mathcal{L}$ it follows there is a canonical surjective map of $\mathcal{O}_X$-modules
$\phi: \mathcal{O}_X\{y_1,..,y_l\}\rightarrow \mathcal{L}$ defined on an open set $U$ by $\phi(\sum_i u_iy_i):=\sum_i u_i(s_i)_U$ where $(s_i)_U$ is the restriction of $s_i$ to $U$. The details may be found in Hartshorne's book Chapter II.7.
Best Answer
First, let's fix some notation to make our lives easier. Let $S_\bullet$ be a $\mathbb{Z}^{\geq 0}$-graded ring. We construct a scheme $\operatorname{Proj}(S_\bullet)$. It has a covering by affine open patches of the form $\operatorname{Spec}((S_{\bullet})_f)_0)$. In words, these affine open patches are the spectrum of the degree $0$ part of the localization of the graded ring at some homogeneous element $f$ of positive degree. These form a base for the topology on $\operatorname{Proj}(S_\bullet)$, and we can identify $\operatorname{Spec}((S_{\bullet})_f)_0)$ with $D(f)=\{p:f(p)\neq 0\}$. To define a sheaf, we only need to define a sheaf on the base, so we need to declare what the sections of our sheaf are on the $D(f)$ basic opens. Now let $M_\bullet$ be a $\mathbb{Z}$-graded $S$-module. In your case, we just take $M_\bullet=S_\bullet$. As you have in your post, we can define the graded module $M(n)_{\bullet}$ by $M(n)_{m}=M_{n+m}$. Now, we are ready to define our sheaf. We let $\Gamma(D(f),\widetilde{M(n)_{\bullet}})=((M_{\bullet})_f)_n$.
The important thing to understand here is that this is really the only definition that could possibly make sense! Indeed, it's precisely the definition that generalizes what the sheaf associated to a module is in the affine case, as we just take our sections over the basic affine opens to be the degree $0$ part of the localization of our given module $M(n)$.
Now, with these generalities in mind, how do we think about global sections of $\mathcal{O}_S(d)$? A global section is given by the data of local sections on an open covering that agree on overlaps. According to our definition, we can just think of these local sections as being of the form $\frac{s}{f}$ where $s\in S_{\bullet}$ is homogeneous and $f$ is some homogeneous element of positive degree, such that the difference in the degrees of $s$ and $f$ is $d$. But if these local sections have to agree on all the overlaps, then we can't have any denominators (you should work this out)! So we can precisely identify global sections with homogeneous degree $d$ elements of $S_{\bullet}$.