You don't find $w$. $w$ is a "given", in the following sense. For the weak formulation of the problem to make sense, the statement
$$ u|_{\partial\Omega} = g $$
is in fact the following statement: $\exists$ a fixed $w \in H^1(\Omega)$ such that the trace of $w$ to $\partial \Omega$ is equal to the trace of $u$.
The relevant section in Evans is trying to explain this. Basically what he is trying to say is that the intuition for the Dirichlet problem with "strong" solutions, where you prescribe boundary value as some continuous function $g$ on the boundary, must be replaced by an appropriate weak version defined relative to the trace operator to hypersurfaces, when you consider the weak formulation of the problem. This is because a solution $u$, as an object in the space $W^{1,2} = H^1$, is only an equivalent class of functions defined up to sets of measure zero. If $\Omega$ is a sufficiently regular open set, $\partial\Omega$ has measure zero, so it is meaningless to state that $u$ coincides with $g$ on $\partial\Omega$, since $u$ can always be modified on just $\partial\Omega$ to give any value you want there.
You should compare this to, for example, Theorem 8.3 in Gilbarg and Trudinger, Elliptical partial differential equations of second order, which states
Let [$L$ be an elliptic operator]. Then for $\psi \in W^{1,2}(\Omega)$ and $g,f^i\in L^2(\Omega)$, $i = 1 , \ldots, n$, the generalized Dirichlet problem, $Lu = g + D_i f^i$ in $\Omega$, $u = \psi$ on $\partial\Omega$ is uniquely solvable.
It is not appropriate to work in the space $H^1_0(U)$ since nonzero boundary conditions are being considered. You will have to assume some regularity of the boundary of $U$.
One version of Green's theorem (see e.g. the appendix in Evans) is that $$- \int_U (\Delta u) v \, dx = \int_U Du \cdot Dv \, dx -\int_{\partial U} \frac{\partial u}{\partial \nu} v \, dS.$$
A weak solution to the problem at hand can be proposed by setting $-\Delta u = f$ in $U$ and $\dfrac{\partial u}{\partial \nu} = -u$ on $\partial U$ so that $$\int_U fv = \int_U Du \cdot Dv + \int_{\partial U} uv \, dS \quad \forall v \in H^1(U)$$
or a bit more precisely
$$\int_U fv = \int_U Du \cdot Dv + \int_{\partial U} \newcommand{\tr}{\mathrm{Tr}\ \! }( \tr u )(\tr v) \, dS \quad \forall v \in H^1(U)$$
where $\tr : H^1(U) \to L^2(\partial U)$ is the trace operator.
An appropriate bilinear form is thus given by $$B[u,v] = \int_U Du \cdot Dv + \int_{\partial U} \newcommand{\tr}{\mathrm{Tr}\ \! }( \tr u )(\tr v) \, dS, \quad u,v \in H^1(U).$$
$B$ is clearly bounded. As far as coercivity goes, it may be helpful to use the Rellich-Kondrachov theorem. I can follow up with a hint if you like.
It remains to show that there is a constant $\alpha > 0$ with the property that $\|u\|_{H^1}^2 \le \alpha B[u,u]$ for all $u \in H^1(U)$. This can be proven by contradition. Otherwise, for every $n \ge \mathbb N$ there would exist $u_n \in H^1(U)$ with the property that $\|u_n\|^2_{H^1} > n B[u_n,u_n]$. For each $n$ define $v_n = \dfrac{u_n}{\|u_n\|_{H^1}}$. Then $v_n \in H^1(U)$, $\|v_n\|_{H^1} = 1$, and $B[v_n,v_n] < \dfrac 1n$ and all $n$.
Here we can invoke Rellich-Kondrachov. Since the family $\{v_n\}$ is bounded in the $H^1$ norm, there is a subsequence $\{v_{n_k}\}$ that converges to a limit $v \in L^2(U)$. However, since $\|Dv_{n_k}\|_{L^2}^2 < \dfrac{1}{n_k}$ it is also true that $Dv_{n_k} \to 0$ in $L^2$. Thus for any $\phi \in C_0^\infty(U)$ you have $$\int_U v D \phi \, dx = \lim_{k \to \infty} \int_U v_{n_k} D \phi \, dx = - \lim_{k \to \infty} \int_U D v_{n_k} \phi \, dx = 0.$$ This means $v \in H^1(U)$ and $D v = 0$, from which you can conclude $v_{n_k} \to v$ in $H^1(U)$. Since $\|v_{n_k}\|_{H^1} = 1$ for all $k$ it follows that $\|v\|_{H^1} = 1$ as well.
Next, since $\|\tr v_{n_k}\|_{L^2(\partial U)}^2 < \dfrac{1}{n_k}$ and the trace operator is bounded there is a constant $C$ for which
$$ \|\tr v\|_{L^2(\partial \Omega)} \le \|\tr v - \tr v_{n_k}\|_{L^2(\partial \Omega)} + \|\tr v_{n_k}\|_{L^2(\partial \Omega)} < \frac{1}{n_k} + C \|v - v_{n_k}\|_{H^1(U)}.$$
Let $k \to \infty$ to find that $\tr v = 0$ in $L^2(\partial U)$.
Can you prove that if $v \in H^1(U)$, $Dv = 0$, and $\tr v = 0$, then $v = 0$? Once you have established that fact you arrive at a contradiction, since $v$ also satisfies $\|v\|_{H^1} = 1$. It follows that $B$ is in fact coercive.
Best Answer
You can prove existence of weak solutions in the space $$ V=\{u \in H^1(U): \ \int_U u\ dx= 0\}, $$ i.e., apply Lax-Milgram on $V$.
Then verify that such a function is also a solution of the weak formulation for test functions in the larger space $H^1$.