Think of the unit square in $\mathbb{R}$ with the top and bottom edges identified with $a$ pointing right, and the left and right edges identified with $b$ pointing down. Now say your generator $c$ for $\pi_1(A\cap B)$ traverses the circle formed by $A\cap B$ once in the clockwise direction. When you include this into $B$, where does it go? By your retraction it goes to the boundary, and as it goes clockwise it runs along $aba^{-1}b^{-1}$.
Geometrically, picture $A$ as a disk on the surface of the torus, and $B$ as the rest of the torus (with a little overlap to make $A\cap B$). Then picture the circle $A\cap B$ staying still on the surface of the torus as you retract $B$ to the "frame" formed by $S^1\vee S^1$. If you were to include this circle into the frame by stretching it out, it would run along one circle, then the other, then the first in the reverse direction, then the second in reverse direction.
If I understand your problem in the right way, you can calculate the fundamental group of the connected sum of two tori in the following way:
You divide the connected sum of the two tori into $U$, $V$ and $U\cap V$ like you see in the picture above in the sense of Seifert-van Kampen.
The picture for $U$ and $V$ is very similar. By deformation retraction you get:
where the red circle is the hole, you get. This deformation retracts to a bouquet of two copys of an $S^1$, i.e. $S^1\vee S^1$.
$U\cap V$ deformation retracts to an $S^1$.
Now we have to look at the inclusions $i_1:U\cap V\to U$ and $i_2:U\cap V\to V$. The generator (loop) in $U\cap V$, let's call it $c$, is sent by deformation retraction in $U$ or in $V$ to the boundary.
Let us say $a$ and $b$ are the generators in $U$ and $\alpha$ and $\beta$ are the generators in $V$. Then $i_{1\ast}(c)=aba^{-1}b^{-1}$ and $i_{2\ast}(c)=\alpha\beta\alpha^{-1}\beta^{-1}$ (cf. picture above and the boundary!).
So we have
$$\pi_1(U\cup V) = \pi_1(S^1\vee S^1)\ast_{\pi_1(S^1)}\pi_1(S^1\vee S^1) = (\pi_1(S^1)\ast \pi_1(S^1))\ast_{\pi_1(S^1)}(\pi_1(S^1)\ast \pi_1(S^1))=\langle a,b,\alpha,\beta|aba^{-1}b^{-1}\alpha^{-1}\beta^{-1}\alpha\beta\rangle$$
(If you don't understand the last step, see "Algebraic Topology" (Hatcher, p. 43).)
Of course it makes sense to use the presentation as a polygon with vertices identified, if you consider the general case, $T^{\#n}$ ($n\in \mathbb{N}$). But for $n=2$, I think it is more intuitive to draw something like the first picture.
MfG
Daniel
Best Answer
Perhaps we're thinking of different notions of "fundamental polygons", but I believe the torus $T^2$ is the fundamental polygon $P$ (obtained as the quotient of a square). The two spaces are certainly homeomorphic, if not the same by definition. Thus $\pi_1(T^2)\cong\pi_1(P)$. We'll decompose and apply van Kampen's theorem to $P$. For convenience, we'll call the horizontal edges $A$ and the vertical edges $B$.
We'll decompose $P$ in almost the same way you suggested: fix a point $x_0$ in the middle of $P$, and let $U$ be $P \setminus \{x_0\}$ and $V$ be a small open disk around $x_0$. Then $\pi_1(T^2) \cong \pi_1(P)\cong\big( \pi_1(U) * \pi_1(V)\big)/N$, where $N$ is the subgroup generated by those "words" in $\pi_1(U) * \pi_1(V)$ that represent loops that are actually nullhomotopic (that is, can be shrunk down to points). In particular, think about the "boundary" word $A^{-1}B^{-1}AB$. It is nontrivial in $U$, but we know that it can actually be shrunk down to a point when it lives in $P$.
The image below depicts a deformation of $U$ to the figure eight $S^1 \vee S^1$. What does this imply for $\pi_1(U)$? I'm also happy to provide more hints.