Here is my attempt, where everything seems reasonable and resists my sanity checks, but I'm not an algebraic topologist so please check over my work!
The main idea is what I wrote in the comment - we figure out what the maps are in the Mayer-Vietoris sequence by looking at where they come from topologically, and use the fact that a long exact sequence can be split up into short exact sequences, and the fact that $\mathbb{Z}$ is projective in order to stitch together the homology from the image and kernel. This wouldn't work if all the groups in sight for $A, B, U_1, U_2$ weren't all just $\mathbb{Z}$ and powers thereof. But since they are, we get some extra computing power from this too, so we'll use your decomposition, since it's a nice one for calculating with.
So let's start with the sequence.
$$0 \to H_2(A \cap B) \to H_2(A) \oplus H_2(B) \to H_2(X) \to H_1(A \cap B) \to H_1(A) \oplus H_1(B) \to H_1(X) \to ...$$
The tail of the sequence is kind of trivial. We know that the zeroth homology is just the free group on the connected components. All our spaces are connected, so we know that the tail of the sequence is
$$ ...\to \mathbb{Z} \to \mathbb{Z} \oplus \mathbb{Z} \to \mathbb{Z} \to 0 $$
But just to sanity check, let's take a quick look at the maps.
Thus, the map taking $\mathbb{Z} \to \mathbb{Z} \oplus \mathbb{Z}$ takes the connected component corresponding to the the cylinder and includes it into each. We can choose orientations so that this is the map $1 \mapsto (1,1)$. If we do this, it follows that the map taking $\mathbb{Z} \oplus \mathbb{Z} \to \mathbb{Z}$ must be $(n,m) \mapsto n - m$, which is reasonable, since this map is $k_* - l_*$, and both $k$ and $l$ ought to be the maps taking their respective generator to itself, as both tori are connected and the whole space is connected. It is easy to see this is exact.
So now let's do this with $H_2$ since it is the next easiest, in my opinion.
You correctly observe that the intersection is homotopy equivalent to a circle. This makes $H_2(A \cap B) = 0$. Also, $H_2(A) = H_2(B) = \mathbb{Z}$ as tori are orientable surfaces, and it is a standard fact that such surfaces have top homology $\mathbb{Z}$. Note that our space is not a topological surface.
Now we know by injectivity (by exactness) that $H_2(X)$ must contain $\mathbb{Z} \oplus \mathbb{Z}$. We know the homology groups of the circle and tori, so we are looking at the section of the sequence that looks like
$$ ... \to \mathbb{Z} \oplus \mathbb{Z} \to H_2(X) \to \mathbb{Z} \to \mathbb{Z}^4 \to ... $$
and we want to what this last map is. It is the sum of two maps, each $\mathbb{Z} \to \mathbb{Z} \oplus \mathbb{Z}$, taking the homology class of the cylinder into the torus. But our decomposition shows that this disk which it bounds is a boundary, and so this map is the $0$ map, and so this plus the algebraic observations at the beginning imply $H_2(X) = \mathbb{Z}^3$.
This is a reasonable answer because thinking of this space as a CW complex, each torus has a contribution of a $\mathbb{Z}$, and the gluing along a cylinder creates a sort of sphere enclosed inside the cylinder and the disks of the tori.
Now let's see about $H_1$. We expect that attaching the cylinder doesn't change anything because we already saw that the inclusions were the $0$ map, so there shouldn't be a homology class corresponding to the cylinder. To see this, observe that since $(i_*, j_*)$ is the $0$ map, the map $\mathbb{Z}^4 \to H_1(X)$ must be injective. Thus it's image is $\mathbb{Z}^4$, which means the kernel of $\partial_*$ is $\mathbb{Z}^4$. But we already saw that the map $\mathbb{Z} \to \mathbb{Z} \oplus \mathbb{Z}$ on $0$th homology was injective, and this means $\partial_*$ has image $0$, since the next map has kernel $0$. Now we know that $\partial_*$ is the $0$ map, and we know it's kernel, so we know that $H_1(X) = \mathbb{Z}^4$ as well.
And we're done!