Explicit proof that $\mathbb{P}_B^n\cong\mathbb{P}_A^n\times_{\operatorname{Spec}A}\operatorname{Spec} B$ On page 103 of Hartshore, just before the definition of projective morphisms, he states that if $\varphi:A\to B$ is a ring morphism and $(f,f^{\#}):\operatorname{Spec}B\to \operatorname{Spec}A$ is the induced morphism on spectra, then we have $\mathbb{P}_B^n\cong \mathbb{P}_A^n\times_{\operatorname{Spec}A}\operatorname{Spec} B$. He gives no explanation, and at least for a beginner like me, this doesn't seem so obvious. If we denote by $\iota_A:A\hookrightarrow A[x_0,...,x_n]$ resp. $\iota_B:B\hookrightarrow B[x_0,...,x_n]$ the natural inclusions and by $\hat\varphi:A[x_0,...,x_n]\to B[x_0,...,x_n]$ the induced morphism such that $\hat\varphi\circ\iota_A=\iota_B\circ\varphi$, then I think these should induce the implicit structure morphisms $(\hat f,\hat{f}^{\#}):\mathbb{P}_B^n\to\mathbb{P}_A^n$, $(p_A,p_A^{\#}):\mathbb{P}_A^n\to\operatorname{Spec} A$ resp. $(p_B,p_B^{\#}):\mathbb{P}_B^n\to\operatorname{Spec} B$. I know of this post, however I would like to find a more explicit proof. That is, I would like to construct from morphisms $X\to\mathbb{P}_A^n$ and $X\to \operatorname{Spec}$ the product morphism $X\to\mathbb{P}_B^n$. To construct such a morphism, one should be able, given prime ideals $\mathfrak{p}\in\mathbb{P}_A^n$ and $\mathfrak{b}\in\operatorname{Spec} B$ such that $\iota_A^{-1}(\mathfrak{p})=\varphi^{-1}(\mathfrak{b})$, a prime ideal $\mathfrak{q}\in\mathbb{P}_B^n$ such that $\iota_B^{-1}(\mathfrak{q})=\mathfrak{b}$ and $\hat\varphi^{-1}(\mathfrak{q})=\mathfrak{p}$. But as prime ideals don't behave well under extension, I'm not sure how to accomplish this. So how to proceed?
 A: Suppose we have a pair of morphisms $\newcommand{\Spec}{\operatorname{Spec}}\newcommand{\PP}{\mathbb{P}}\newcommand{\AA}{\mathbb{A}} X\to \PP^n_A$ and $X\to\Spec B$ which are equal after composing with the maps $\PP^n_A\to\Spec A$ and $\Spec B\to \Spec A$. Covering $\PP^n_A$ with the standard affine opens $\AA^n_A\to\PP^n_A$, we can form a cover of $X$ by open subschemes $U_i$ which all map in to a single standard affine open. Refining this cover to a cover by affine open subsets, we can assume that $X$ is covered by a collection of open affine subschemes which each land inside one of the standard affine opens.
For any affine scheme $U$ with maps $U\to\AA^n_A$ and $U\to \Spec B$ which agree after composing with the maps $\AA^n_A\to\Spec A$ and $\Spec B\to \Spec A$, we have a unique induced morphism $U\to \AA^n_A\times_A\Spec B$. As fiber products of affine schemes are given by the spectrum of the tensor products of their coordinate rings, we have that $\AA^n_A\times_A\Spec B = \Spec (A[x_1,\cdots,x_n]\otimes_A B)=\Spec B[x_1,\cdots,x_n]=\AA^n_B$. Composing with the inclusion $\AA^n_B\to \PP^n_B$, we see that we obtain a compatible collection of maps to $\PP^n_B$ from the $U_i\subset X$ to $\PP^n_B$. By the uniqueness of gluing, this implies we have a unique map $X\to\PP^n_B$ and thus $\PP^n_B=\PP^n_A\times_A\Spec B$.

Alternatively, one can use the direct construction of the fiber product to prove this. $\PP^n_A\times_A \Spec B$ is glued together from the fiber products $\AA^n_A\times_A\Spec B=\AA^n_B$ as $\AA^n_A$ runs over the standard affine opens of $\PP^n_A$. The gluing data for this scheme is the same as the gluing data for $\PP^n_B$, so by uniqueness of gluing we have that the schemes are isomorphic.
