Although you've got the answer by yourself, I would like to write an answer solving the problem with cellular homology, so that someone who asks the same question can find an answer here. I solved this problem a few month ago in an Algebraic Topology course as an exercise.
Proof:
Let $X = S^1\times S^1/ \sim$ be the space with the identifications:
$$(e^{2\pi i/m}z,x_0)\sim (z,x_0)$$
$$(x_0,e^{2\pi i/n}z)\sim (x_0,z)$$
Like @Berci said, you should imagine this space as a grid of $m$ and $n$ lines, i.e. there are $m$ vertical and $n$ horizontal repititions:
(OK. The picture is not the nicest one, but it's enough to induce an imagination.)
$X$ consists of one 0-cell ($x_0$ is $e_1^0$), two 1-cells ($a$ is $e_1^1$, $b$ is $e_2^1$) and one 2-cell (we all it $e_1^2$).
The attaching map identifies $x\in \partial D_1^2$ with $a^nb^ma^{-n}b^{-m}$.
This implies the cellular chain complex
$$0\to \mathbb{Z}[e_1^2]\overset{\partial_2=0}{\longrightarrow} \mathbb{Z}[a] \oplus\mathbb{Z}[b]\overset{\partial_1=0}{\longrightarrow} \mathbb{Z}[x_0]\to 0.$$
This implies
$$H_p(X) =
\begin{cases}
\mathbb{Z}\mbox{ for } p=0,2 \\
\mathbb{Z}^2\mbox{ for } p=1 \\
0\mbox{ for } p>2
\end{cases}.$$
Otherwise you can just see, that the space $X$ is still a Torus (cf. remark above). So it is not surprising, that we've got the homology group of the Torus.
$A \cap B$ is three open disjoint annuli. Each annulus is homotopy-equivalent to a circle. So $H_1(A \cap B) = \mathbb Z^3$. Each $\mathbb Z$ in this direct sum is generated by a 1-cycle that wraps one of the three annuli. Let's give these generators names:
- Let's say that $\alpha = (1, 0, 0) \in \mathbb Z^3$ wraps the big annulus near the outer boundary of the main disk in a clockwise direction.
- Let's say that $\beta = (0, 1, 0) \in \mathbb Z^3$ wraps the little annulus encircling the left-hand cut-out disk in a clockwise direction.
- Let's say that $\gamma = (0, 0, 1) \in \mathbb Z^3$ wraps the little annulus encircling the right-hand cut-out disk in a clockwise direction.
$A$ is the original disk minus the closures of the two circles cut out minus the boundary of the original disk. It does indeed look like a figure-of-eight, which means that $H_1(A) = \mathbb Z^2$.
- Let's say that $\eta = (1, 0) \in \mathbb Z^2$ is the generator that encircles the left-hand cut-out disk in a clockwise direction
- Let's say that $\zeta = (0, 1) \in \mathbb Z^2$ is the generator that encircles the right-hand cut-out disk in a clockwise direction.
- Thus a loop that runs encircles both cut-outs in a clockwise direction is represented by the class $\eta + \zeta = (1, 1) \in \mathbb Z^2$.
$B$ is a little neighbourhood around the circle formed by identifying the three boundary circles. So $H_1(B) = \mathbb Z$.
- Let's say that $\epsilon = 1 \in \mathbb Z$ is the generator that wraps this circle in a clockwise direction.
In the Mayer-Vietoris sequence
$$ 0 \to H_2 (X) \to H_1(A \cap B) \to H_1(A) \oplus H_1 (B) \to H_1(X) \to 0, $$
the map $H_1(A \cap B) \to H_1(A) \oplus H_1 (B)$ is induced by the inclusion maps $i : A \cap B \hookrightarrow A$ and $j : A \cap B \hookrightarrow B$.
We can visualise how these inclusion maps act on the generators of the various first homology groups.
The map $i_\star : H_1(A \cap B) \to H_1 (A)$ sends $$\alpha \mapsto \eta + \zeta, \ \ \beta \mapsto \eta, \ \ \gamma \mapsto \zeta.$$
The map $j_\star : H_1(A \cap B) \to H_1 (B)$ sends $$ \alpha \mapsto \epsilon, \ \ \beta \mapsto \epsilon, \ \ \gamma \mapsto \epsilon.$$
I encourage you to draw the pictures of these cycles and convince yourself of these inclusions!
This should be enough detail for you to figure out the kernel and cokernel of the map $H_1(A \cap B) \to H_1(A) \oplus H_1 (B)$!
Best Answer
$H_0(X) = \mathbb{Z}$ since it's connected.
$H_2(X) = \mathbb{Z}^2$ since there are two non-contractable spheres
$H_1(X) = \mathbb{Z}$ since the torus has two non-contractible curves, but now one can be contracted along the sphere.
Let $a$ be the torus, and $b\cup b' = S^2$ be the upper and lower hemispheres.
$\partial a = a_1 + a_2 - a_1 - a_2 = 0$
Let $a_1 = \mathbb{T}^2 \cap S^2$ be the meridian of the sphere (as well as the torus)
$\partial b = a_1 =\partial b'$
Let $a_{12}$ be a point of $a_1 =\mathrm{torus}\cap \mathrm{sphere}$:
$\partial a_1 = \partial a_2 = \partial b_1 =a_{12} - a_{12}=0$
$H_0 = \ker\partial / \mathrm{im} \,\partial = \mathrm{span}\langle a_{12}\rangle = \mathbb{Z}$
$H_1 = \ker\partial / \mathrm{im} \,\partial = \mathrm{span}\langle a_1, a_2\rangle / \mathrm{span}\langle a_1\rangle = \mathbb{Z}$
$H_2 = \ker\partial = \mathrm{span}\langle a,b-b'\rangle = \mathbb{Z}^2$
You may also observe the meridian circle $\mathrm{sphere} \cap \mathrm{torus}$ is contractible to a point.
In Hatcher Chapter 0, example 0.8 (page 12) shows us the sphere with two points identified is the homotopy equivalent to the wedge of a sphere and a circle.
$$ S^2 \simeq S^2 \vee S^1$$
For your example, $ \mathbb{T}^2 \cup_{S^1} S^2 \simeq S^2 \vee S^2 \vee S^1$.
Their homology groups will also be the same. $H_0 = \mathbb{Z}, H_1 = \mathbb{Z}, H_2 = \mathbb{Z}^2$.