Let $\phi':A'\rightarrow B'$ be a ring homomorphism and $I$ an ideal of $A'$; we set $A=A'/I$, $B=B'/IB',$ and write $\phi: A\rightarrow B$ for the map induced by $\phi'$. If $\mathfrak p'$ is a prime ideal of $A'$ such that $I\subset \mathfrak p'$, we set $\mathfrak p=\mathfrak p'/I$.
My question is why $$B'\otimes_{A'}(A'/\mathfrak p')_{\mathfrak p'}=B\otimes_A(A/\mathfrak p)_{\mathfrak p}$$
This is stated in $\it{\text{Matsumura, Commutative Ring Theory}, page-184, Remark.}$
Thank you.
You have an obvious surjective map $B'\otimes_{A'}(A'/\mathfrak p')_{\mathfrak p'} \to B\otimes_A (A/\mathfrak p)_\mathfrak p$
Moreover, $A/\mathfrak p = (A'/I)/(\mathfrak p'/I) \simeq A'/\mathfrak p'$ is a classical exercise, as $I\subset \mathfrak p'$, and the localization is actually just taking the field of fractions (if I understand the notation -which seems odd- correctly), so that's still an isomorphism.
Now if $b=b'$ mod $IB'$ then $b-b' = \sum_i \phi'(k_i)b_i$, $k_i \in I$ and so $(b-b')\otimes 1 = \sum_i b_i\otimes \phi'(k_i) = \sum_i b_i\otimes 0 = 0$.
That should be enough to tell you there is a map going in the other direction which is an inverse of that one.