# Gluing tori and surgery related lens spaces

I came up with this question when I was thinking about the lens space obtained by an integer surgery along a Hopf link.

Let $T_1, T_1', T_2, T_2'$ be a solid torus $S^1 \times D^2$. We regard the torus $T_i$ to be a small neighborhood of the central fiber $S^1 \times \{*\}$ of $T_i'$.

We cut out $T_i$ from $T_i'$ and glue it back along a homeomorphism $A_i$ of the common boundary $\partial T_i$, i.e $A_i:\partial T_i \to T_i'\setminus T_i$.

Also suppose there is a homeomorphism $B:\partial T'_1 \to \partial T'_2$.

We can form the following 3-manifold by gluing these tori via these homeomorphisms: $$(T_1 \cup_{A_1} (T'_1 \setminus T_1)) \cup_B (T_2 \cup_{A_2} (T'_2 \setminus T_2))$$

I would like to know if this is homeomorphic to $$T_1 \cup_{A_2^{-1}BA_1}T_2.$$

First of all, it might not be rigorous to say $A_2^{-1}BA_1$ is a homeomorphism from $\partial T_1$ to $\partial T_2$. (Somehow I need to extend maps?)

It would be great if you can understand what I want to say. I appreciate any help.

-