For a prime ideal $\def\p{\mathfrak{p}}\p\subset A$ and a ring map $A\to B$, what is $B_\p/\p B_\p$? Can $\mathfrak{p}$ be a prime ideal of $B$?

I'm studying Gortz, Algebraic Geometry 1, p. 351 Lemma 12.74

enter image description here

enter image description here

In the underlined statement, what $\operatorname{Spec}B_\mathfrak{p}/\mathfrak{p}B_\mathfrak{p}$? $\mathfrak{p}$ can be a prime ideal of $B$? In general, prime ideal of a subring need not be a prime ideal of the ambient ring. In case of 'integrally closed subring', or "$B$ is of the form $A[b]$", can it be possible?

If so, how can we deduce $f^{-1}(y) \cong X \times_{Y} \operatorname{Spec}k(y) \cong \operatorname{Spec}(B\otimes _Ak(y))\cong \operatorname{Spec}(B\otimes_AA_{\mathfrak{p}}/\mathfrak{p}A_\mathfrak{p}) \cong \operatorname{Spec}(B_\mathfrak{p}/\mathfrak{p}B_\mathfrak{p})$ (the last step)?


Given a prime ideal $\mathfrak{p}\subset A$, for any $A$-module $M$ we can define $M_\mathfrak{p}=M\otimes_A A_\mathfrak{p}$ to be the localization of $M$ at $\mathfrak{p}$. Since a ring map $A\to B$ makes $B$ in to an $A$-module (even an $A$-algebra), $B_\mathfrak{p}$ is just $B\otimes_A A_\mathfrak{p}$.

Similarly, for any $A$-module $M$ and any ideal $I\subset A$, we can ask about the submodule $IM\subset M$ and take the quotient to get the module $M/IM$. As $B_\mathfrak{p}$ is an $A$-module and $\mathfrak{p}\subset A$ is an ideal, we apply that procedure and get $B_\mathfrak{p}/\mathfrak{p}B_\mathfrak{p}$.

This also tells you exactly how to deduce the line of math that you're concerned about: writing $k(y)=A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}$, we have that $B\otimes_A k(y) \cong B\otimes_A A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}$. Next, writing $A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}\cong A_\mathfrak{p} \otimes_A A/\mathfrak{p}$, we can write $B\otimes_A A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}\cong B\otimes_A A_\mathfrak{p} \otimes_A A/\mathfrak{p}\cong B_\mathfrak{p}\otimes_A A/\mathfrak{p} \cong B_\mathfrak{p}/\mathfrak{p}B_\mathfrak{p}$ since $M\otimes_R R/I\cong M/IM$.

There's no need to worry about whether $\mathfrak{p}$ is a prime ideal (or even an ideal at all!) in $B$. For instance, if $A=\Bbb Z$ and $B=\Bbb Z[1/2]$, the image of the ideal $\mathfrak{p}=(2)\subset A$ is not even an ideal in $B$.