Let $X$ be a topological space. Let $\mathcal{F}$ be a sheaf on $X$. The stalk is the direct limit $$ \mathcal{F}_x = \lim_{\underset{V \ni x}{\longrightarrow}} \mathcal{F}(V) $$
Let $U \subset X$ be an open subset that contains $x \in X$. Then $$(\mathcal{F}|_U)_x \cong \mathcal{F}_x \ . $$
This seems to be correct as the stalk is local, and due to the direct limit we pass through $U$ and thus consider $\mathcal{F}|_U$ and its restriction.
How to prove it formally?
First, it's confusing that you use $U$ twice, so I'm replacing your second $U$ with $V$. You can use the Yoneda lemma: maps out of the limit are the same as maps out of all $F(U)$ with compatibilities. This is by definition of limit if you like. The functor I mean here is the functor taking an object $X$ to the set of maps $X \rightarrow F(U)$ for all $U$, with compatibility with restriction.
You want to construct a natural isomorphism between maps out of the all $F(U)$ and maps out of all $F(U')$ such that $U' \subset V$ (with compatibilities). If you have maps out of all $F(U')$ such that $U' \subset V$, then for general $U$ you can precompose with the restriction maps $F(U) \rightarrow F(U')$ for all $U$. Check that this is a welld-defined natural transf. in the sense that all restriction maps are compatible (exercise). Then show that this natural transformation is a natural isomorphism: injectivity is obvious and surjectivity is due to every open $U$ having a sub-open contained in $V$.
The details you should probably convince yourself of, I think the important thing here is that the Yoneda lemma makes the proof a lot cleaner. (I am using the version where, to show that two objects $X$, $Y$ are isomorphic is the same as showing that the functors $Hom(-, X)$ and $Hom(-, Y)$ are naturally isomorphic.