The approach is correct, but you can use a simpler method.
The space you care about is homotopic to the wedge sum of two spheres and one circle. Thus the fundamental group is Z. To see why this space is homotopic to the space I said, you just check first that you can contract the upper half-sphere, thus the lower half-sphere becomes to a sphere, and the torus becomes a sphere with its south and north poles glued together. A sphere with its south and north poles glued together is homotopic to a sphere with a line connect its south and north poles. After these deformations you have a space which is what I said above.
You are incorrect in your calculation of $\pi_1(U_g)$; it's free on $2g+1$ generators. What you need now is that the map $U_g \to U_{g+1}$ induces the map $F_{2g+1} \to F_{2g+3}$ sending the $i$th generator of the first to the $i$th generator of the second. Now we have...
If a space $X$ is the union of a directed set of subspaces $X_\alpha$ ordered by inclusion with the property that each compact set in $X$ is contained in some $X_\alpha$, and each $X_\alpha$ contains a given point $x_0$, then the natural map $\varinjlim \pi_1(X_\alpha,x_0) \to \pi_1(X,x_0)$ is an isomorphism.
Surjectivity follows from the compactness hypothesis; the image of a representing map $f: S^1 \to X$ of an element of $\pi_1(X,x_0)$ lies in some $X_\alpha$, so is in the image of some $f' \in \varinjlim\pi_1(X_\alpha, x_0)$. Suppose $f \in \varinjlim \pi_1(X_\alpha, x_0)$ maps to zero; then we have a null-homotopy $f_t: S^1 \times I \to X$. Since the image of this is compact, this defines a null-homotopy $f_t: S^1 \times I \to X_\alpha$ for some $\alpha$, so $f$ is zero in $\varinjlim \pi_1(X_\alpha, x_0)$ as well.
(This fact, and its proof, is an adaptation of Proposition 3.33 in Hatcher's algebraic topology book.)
Taking the limit of $\pi_1(U_g,x_0)$ gives us that $\pi_1(U) \cong F_\infty$, the free group on countably many generators. Similarly for $\pi_1(V,x_0)$.
Now $U \cap V \cong S^1$, and the inclusion $S^1 \to U, S^1 \to V$ induces the map $F_1 \to F_\infty$ sending the generator of the first to a chosen generator of the second. Thus by the van Kampen theorem, $$\pi_1(U \cup V, x_0) \cong \langle u_1, v_1, u_2, v_2, \dots \, \mid \, u_1 = v_1\rangle,$$
giving $\pi_1(X,x_0) = \pi_1(U \cup V, x_0) \cong F_\infty$ as desired.
Best Answer
This is incorrect.
Let $[x, y] = xyx^{-1}y^{-1}$ be the commutator of $x$ and $y$.
A genus $2$ surface can be constructed by starting with a wedge sum of $4$ circles $\{a_1, b_1, a_2, b_2\}$ and attaching a $2$-cell along $[a_1, b_1] [a_2, b_2]$. The fundamental group is then $$ \langle a_1, b_1, a_2, b_2 \mid [a_1, b_1] [a_2, b_2]\rangle. $$
The abelianization of this group is $\mathbb Z^4$. The abelianization of the group you have is $\mathbb Z^3$. Thus, they are different.