= Solution
Necessity follows from commutativity of the <fibre product of schemes> square: if $p(z)=x$ and $q(z)=y$, then $f(x)=g(y)$.
For sufficiency, put $s=f(x)=g(y)$ and $K=\kappa(s)$, $L=\kappa(x)$, $L'=\kappa(y)$. The maps on <local rings> induce field embeddings $K\hookrightarrow L,L'$. The canonical point maps into $X$ and $Y$ therefore give a <morphism of schemes>
$$
\operatorname{Spec}(L\otimes_KL')
=\operatorname{Spec}L\times_{\operatorname{Spec}K}\operatorname{Spec}L'
\longrightarrow X\times_SY.
$$
The <tensor product of commutative algebras> $L\otimes_KL'$ is nonzero. To see the hinted fact directly, choose a $K$-basis of $L$ containing $1$; tensoring that basis with $L'$ makes $1\otimes1$ nonzero. A nonzero unital <commutative ring> has a <prime ideal>, so its <spectrum of a commutative ring> has a point $w$. Its projections to the two field spectra are their unique points. The image $z$ of $w$ consequently projects to $x$ and $y$.
\b[The desired point exists precisely when the base images coincide.] This is the <point-lifting property of a scheme fibre product>. It does not claim that such a point is unique: different <prime ideals> of the tensor product may give different points over the same pair.
Back to article page