Let $A,B$ be two $R-$algebra. (i.e. we have two homomorphisms: $f:R\rightarrow A$ and $g:R\rightarrow B$) We denote two canonical homomorphism $A\rightarrow A\otimes_R B$ and $B\rightarrow A\otimes_R B$ by $u,v$ respectively.
Suppose $p\in \operatorname{Spec}A$, $q\in \operatorname{Spec}B$ and $f^{-1}(p)=g^{-1}(q)$. How to find a $t\in \operatorname{Spec}(A\otimes_R B) $ such that $u^{-1}(t)=p$ and $v^{-1}(t)=q$.
By the universal property of the tensor product, from the maps $R\to A \to Frac(A/p)$ and $R\to B\to Frac(B/q)$ we get a map $$A\otimes_R B\to Frac(A/p)\otimes_R Frac(B/q)\cong Frac(A/p)\otimes_{Frac(R/f^{-1}(p))} Frac(B/q)$$ and the pullback of any prime ideal in this ring suffices. To show this ring has prime ideals, it suffices to show that it's nonzero, but this is clear because it's a tensor product of nonzero vector spaces over a field.