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.
I'll offer some hints as I think this is an exercise that you should get some practice with to really understand some of the tools being used.
As has already been mentioned a few times, it is probably easier to think of this space $X=\mathbb{R}^3\setminus T$ as the homotopy equivalent space $\mathbb{R}^3\setminus S^1$ where $S^1$ is an unknotted circle embedded in $\mathbb{R}^3$ (It's interesting to note that the qualifier 'unknotted' here is very important. If $S^1$ is knotted, then the fundamental group of its complement in $\mathbb{R}^3$ is known as the knot group of the knot and can be very different from the knot group of the unknot).
There are a few ways to tackle the problem now. Probably the easiest computationally (although perhaps hardest to visualise) is to note that $\mathbb{R}^3\setminus S^1$ is homotopy equivalent to the wedge sum of a $2$-sphere and a circle. That is $\mathbb{R}^3\setminus S^1\simeq S^2\vee S^1$. To see this, deformation retract $\mathbb{R}^3\setminus S^1$ on to the subspace $B\setminus S^1$ where $B$ is a solid ball containing $S^1$. Now, 'push' the negative space of the removed $S^1$ to the boundary of the ball so that we have the space $S^2\cup I$ where $I$ is an interval connecting the north and south pole of the sphere. You can now drag one end of the interval around to the other end so that it becomes a circle, giving $S^2\vee S^1$. The rest is just some simple applications of Seifert-van Kampen and knowing the fundamental groups of usual spaces.
Another approach would be to 'slice' $3$-space along a plane which also cuts the circle, leaving you with two half spaces, each with a removed interval whose ends are on the boundary of the half-spaces. If you 'thicken' these spaces up so that their intersection is open in $\mathbb{R}^3\setminus S^1$, then you can apply Seifert-van Kampen directly to this union. The only tricky part here is working out which elements in the fundamental group of the intersection correspond to the normal subgroup you will factor out of the free product.
One other approach might be to use the space that another user constructed in his answer.
EDIT that answer referenced was deleted so I will just say that it is the product of the space $S^1$ with $H\setminus \{p\}$ where $H$ is an open half plane, $p\in H$ and we view this space as a 'surface of revolution' in $\mathbb{R}^3$, which is homotopy equivalent to $(\mathbb{R}^3\setminus S^1)\setminus l$ where $l$ is an infinite line which passes through $S^1$.
If you then consider that the union of this space with an open tubular neighbourhood of $l$ is exactly the space you are considering, then another application of Seifert-van Kampen should give you the fundamental group of your space readily (I haven't written this down so I'm not sure if there will be any difficulties in this decomposition, but I can't see why there would be).
Best Answer
It helps to think of the 3 sphere as the union of two solid tori. The circles Hatcher uses in the mapping cylinder construction are the cores of the solid torus plus a curve parallel to the knot in the separating torus.