In Görtz and Wedhorn's AGI (3.4)
Let $X$ be a scheme. Let $x ∈ X$, and let $U \subset X$ be an affine open neighborhood of $x$, say $U = \mathop{Spec} A$. Denote by $p \subset A$ the prime ideal of $A$ corresponding to $x$. Then $\mathcal{O}_{X,x} = \mathcal{O}_{U,x} = A_p$, and the natural homomorphism $A \to A_p$ gives us a morphism $$j_x \colon \mathop{Spec} \mathcal{O}_{X,x} = \mathop{Spec} A_p \to \mathop{Spec}A = U \subset X $$ of schemes. By Proposition 3.2 (2) this morphism is independent of the choice of $U$.
The Proposition 3.2 (2) is the following:
Let $X$ be a scheme. The affine open subscheme are a basis of the topology.
My question: Why is this morphism independent of the choice of $U$?
Let's start with the Affine Communication Lemma
So in your case you get two morphisms $$ j_1 : Spec \ \mathcal O_{X,x} \rightarrow U$$ and $$ j_2 : Spec \ \mathcal O_{X,x} \rightarrow V $$
Since $ W$ is a distinguished open affine in $U$ the first morphism factors through $$ Spec \ \mathcal O_{X,x} \rightarrow W \to U$$ and the second factors through $$ Spec \ \mathcal O_{X,x} \rightarrow W \to V$$.
The first arrow in both the factors is the same morphism by commutativity while the second is just inclusion in both cases. So the composition gives you the same morphism.