I would like to use slightly different notations. Suppose $h \in U'$ have distinct Hahn-Banach extensions $f$ and $g$. Then $f_1 = \dfrac{f}{||h||}, g_1 = \dfrac{g}{||h||} \in S_{X'}, f_1 \neq g_1$, where $S_{X'}$ is the unit sphere in $X'$. By strict convexity of $X'$,
$$
\bigg|\bigg|\frac{f_1 + g_1}{2}\bigg|\bigg| < 1,
$$
and it follows that $||f + g|| < 2||h||$. However, we have
\begin{align*}
||f + g|| &= \sup_{x \in X, ||x|| = 1} | f(x) + g(x) | \\
&\geq \sup_{x \in U, ||x|| = 1} | f(x) + g(x) | \\
&= 2\sup_{x \in U, ||x|| = 1} |h(x)|\\
&= 2||h||,
\end{align*}
a contradiction.
Alright, I think that the following proof works but I am by no means an expert in linear functional analysis so please consider this carefully and decide if it is convincing to you.
Without loss of generality, we can take $W \subset H$ to be a closed linear subspace of $H$ since any continuous map on $W$ can be uniquely extended to $\overline W$ by density.
Since $W$ is closed, it is itself a Hilbert space and so by the Riesz representation theorem, there is $x_f \in W$ such that $$f(w) = \langle w, x_f \rangle, \,\,\,\, \forall w \in W.$$ Using this, we can define and extension of$f$ to $H$. Indeed, define $$F(h) := \langle h, x_f \rangle, \,\,\,\, \forall h \in H$$ and certainly $F$ is a linear extension of $f$ and we will have $$\|F \|_{H'} = \|x_f \|_H = \|f \|_{W'}.$$
Now let $G \in H'$ be another linear extension of $f$ to $H$ guaranteed by the Hanh-Banach theorem. Applying the Riesz Representation Theorem to $G$, we find $x_G \in H$ such that $$G(h) = \langle h, x_G \rangle, \,\,\,\,\, \forall h \in H$$ and since both theorems preserve norms, we have $$\|f\|_{W'} = \|G \|_{H'} = \|x_G\|_H.$$
Now since $F,G$ both extend $f$, they agree on $W$: $$F(w) = G(w) \,\,\, \Longleftrightarrow \langle w, x_f - x_G \rangle =0, \,\,\,\,\, \forall w \in W.$$ In particular, since $x_f \in W$, this shows that $x_f$ and $x_f - x_G$ are orthogonal. Then using our norm equalities and the Pythagorean theorem, we have $$\|x_f\|_H = \|f\|_{W'} = \|G\|_{H'} = \|x_G\|_{H} = \|x_f +(x_G - x_f)\|_H = \sqrt{\|x_f\|^2_H + \|x_f - x_G\|_H^2}.$$ This is possible iff $\|x_f - x_G \|_H = 0$ and so we conclude that $x_f = x_G$ which implies that $F = G$. Thus any extension of $f$ is equal to $F$.
Best Answer
Using your notation, let $P$ be the orthogonal projection onto $G$. Then, for $x\in G$, $$ (x,y)=(x,z)=(Px,z)=(x,Pz). $$ So $(x, y-Pz)=0$ for all $x\in G$, implying that $y=Pz$. You also have that $\|y\|=\|h\|=\|g\|=\|z\|$. So $\|Pz\|=\|z\|$, which implies that $z\in G$, and so $z=y$.