Question 5.11 of Hartshorne
Let $S$ and $T$ be two graded rings with $S_0=T_0=A$. We define the Cartesian product $S\times_A T$ to be the graded ring $\bigoplus_{d\geq 0}S_d\otimes T_d.$ If $X= \operatorname{Proj}(S)$ and $Y= \operatorname{Proj}(T)$, then show that : $\operatorname{Proj}(S\times_A T)\cong X\times_A Y$ and the sheaf $\mathcal{O}(1)$ on $\operatorname{Proj}(S\times_A T)$ is isomorphic to the sheaf $p_1^{*}(\mathcal{O}_X(1))\otimes p_2^{*}(\mathcal{O}_Y(1))$ on $X\times_A Y$.
Attempt
I have shown that $\operatorname{Proj}(S\times_A T)\cong X\times_A Y$. However I am facing difficulty proving the second part.
Let $X\times_A Y$ be represented as $(Z,\mathcal{O}_Z)$
Firstly I am unable to define the map from $p_1^{*}(\mathcal{O}_X(1))\otimes p_2^{*}(\mathcal{O}_Y(1))$ to $\mathcal{O}_Z(1)$. Secondly can anyone give hints for proving it an isomorphism.(It seems that Proposition 5.12 might be useful but how, I don't know).
Any help is appreciated.