Compute $H_{*}(M, \mathbb{Z})$ of gluing 2 solid tori. Let $M$ be the space obtained by gluing two solid tori $D^2 \times S^1$ and $S^1 \times D^2$ together via the identity map of their boundaries. Compute $H_{*}(M, \mathbb{Z}.)$
A Hint:
Use Mayer Vietoris and this is called Handle Body Decomposition. Still I am stucked in  writing the details of the solution, could anyone help me in doing so please?
 A: $\require{AMScd}$
The space $P=(S^1\times D^2)\cup_{S^1\times S^1}(D^2\times S^1)$ we are interested in gluing together is that obtained as the pushout in the next square
\begin{CD}
    S^1\times S^1 @>\subseteq >> S^1\times D^2\\
    @V\subseteq V V   @VVV\\
    D^2\times S^1 @>>> P.
\end{CD}
Since each of the indicated inclusions is a closed embedding (they are closed cofibrations), the triad $(P;S^1\times D^2,D^2\times S^1)$ is excisive and we get a Mayer-Vietoris sequence
$$\dots \rightarrow H_*(S^1\times S^1)\xrightarrow{i_{1*}-i_{2*}} H_*(S^1\times D^2)\oplus H_*(D^2\times S^1)\xrightarrow{j_{1*}+j_{2*}} H_*P\xrightarrow{\Delta} H_{*-1}(S^1\times S^1)\rightarrow \dots$$
where the maps $i_1,i_2,j_1,j_2$ are the inclusions defined by the above square (although I have not labeled them in it), and $\Delta$ is the connecting map granted by the Mayer-Vietoris sequence.
Now $S^1\times S^1$, $S^1\times D^2$ and $D^2\times S^1$ are all path connected, so therefore so is $P$. Thus in degree $0$ we have a split exact sequence
$$0\rightarrow H_0(S^1\times S^1)\xrightarrow{i_{1*}-i_{2*}} H_0(S^1\times D^2)\oplus H_0(D^2\times S^1)\xrightarrow{j_{1*}+j_{2*}} H_0P\rightarrow 0$$
and we can focus on the higher degree homology below. Now 
$$H_1(S^1\times S^1)\cong\mathbb{Z}\oplus\mathbb{Z},\qquad H_1(S^1\times D^2)\cong\mathbb{Z},\qquad H_1(D^2\times S^1)\cong\mathbb{Z}.$$
The first group we can get by applying the Kunneth formula. The second two groups we can get by the homotopy invariance of homology by contracting the discs: $S^1\times D^2\simeq S^1\simeq D^2\times S^1$. 
The point is that not only does the Kunenth formula compute the group, but it tells us exactly what the generators of it are, namely the homology cross products $s_1\times 1$ and $1\times s_1$ of the two copies of your favourite generators $s_1\in H_1S^1$. 
Comparing the two methods of computing the groups above we see that the composite
$$H_1(S^1\times S^1)\xrightarrow{i_{1*}} H_1(S^1\times D^2)\cong H_1S^1$$
coincides with the map induced by projection
$$pr_1:H_1(S^1\times S^1)\rightarrow H_1S^1$$
and this map satisfies $pr_{1*}(s_1\times 1)=s_1$, $pr_{1*}(1\times s_1)=0$. Identical anaylsis gives similar results for the other map $i_{2*}$.
Returning to the Mayer-Vietoris sequence we have
$$\dots\rightarrow H_2(P)\xrightarrow\Delta H_1(S^1\times S^1)\xrightarrow{i_{1*}-i_{2*}} H_1(S^1\times D^2)\oplus H_1(D^2\times S^1)\xrightarrow{j_{1*}+j_{2*}} H_1P\rightarrow 0.$$
The right-hand map is onto by our analysis above of $H_0$. The argument presented above is that $i_{1*}-i_{2*}$ is injective, and identifies with the map 
$$H_1(S^1\times S^1)\cong\mathbb{Z}\oplus\mathbb{Z}\ni (a,b)\mapsto (a,-b)\in \mathbb{Z}\oplus\mathbb{Z}\cong H_1(S^1\times S^2)\oplus H_1(D^2\times S^1).$$
But this map is an isomorphism. Hence $j_{1*}+j_{2*}=0$ by exactness, and 
$$H_1P=0.$$
We also get from exactness that the map $\Delta$ in the above sequence is trivial. Now
$$H_2(S^1\times S^1)\cong\mathbb{Z},\qquad H_n(S^1\times S^1)=0,\quad n\geq3$$
since $S^1\times S^1$ is an orientable $2$-manifold (or just use Kunneth again), and
$$H_n(S^1\times D^2)\cong H_n(D^2\times S^1)\cong H_nS^1=0,\quad n\geq 2$$
the Mayer-Vietoris sequence in degree $2$ degenerates into an isomorphism
$$0\rightarrow H_3P\xrightarrow{\Delta} H_2(S^1\times S^1)\rightarrow 0$$
and this is the top degree in which there is homology. Summarising, we have that
$$H_*P\cong\begin{cases}\mathbb{Z}&\ast=0\\
\mathbb{Z}&\ast=3.\end{cases}$$
Which is exactly what we would expect, really, since $P\cong S^3$. What we have is a rather special form of handle decomposition, reserved for $3$-dimensional manifolds, which is usually called a Heegaard splitting.
