I'm working through Bosch's Introduction to Algebraic Geometry and Commutative Algebra. In Section 7.2, he proves (in Corollary 7) that for any morphism of schemes $f:X\longrightarrow S$, the projection $p:\operatorname{Spec} k(s)\times_SX\longrightarrow X$ induces a homeomorphism onto $X_s:=f^{-1}(s)$ for any point $s\in S$.
In the proof, he first establishes that $p$ is surjective onto $X_s$ as sets, which I'm able to see by looking at the canonical map $|\operatorname{Spec} k(s)\times_SX|\longrightarrow |\operatorname{Spec} k(s)|\times_{|S|} |X|.$ After reducing to the affine case and writing $X=\operatorname{Spec}A$ and $S=\operatorname{Spec} R$, we have a morphism $$\operatorname{Spec} (A\otimes_R k(s))\longrightarrow \operatorname{Spec} A.$$ Passing to global sections, this gives a homomorphism $\varphi:A\longrightarrow A\otimes_R k(s)$, which he claims is obtained by tensoring $R\longrightarrow k(s)$ by $A$ over $R$. However, it's not clear to me why $\varphi$ is obtained from what (I'm assuming is) the canonical map $R\longrightarrow R/\mathfrak{p}_s\longrightarrow k(s).$ I believe the reason should come from how $f^\sharp(X)=f^\sharp(D(1))=\varphi$ is obtained from $f$, but I'm having trouble seeing why.
Thank you for any help!
$\DeclareMathOperator{\Spec}{Spec}$ Generally, if $A$ and $B$ are $R$-algebras, the projection map $$\Spec A \times_{\Spec R} \Spec B \to \Spec A$$ corresponds to the ring homomorphism $A \to A \otimes_R B, a \mapsto a \otimes 1$. In the case $B = k(s) = R_\mathfrak p / \mathfrak p R_\mathfrak p$, this is the same as tensoring the map $R \to k(s)$ with $A$.