For your $1$-surgery on the solid torus $T = S^1 \times D^2$, you should make sure $A$ is a copy of $S^1 \times D^2$ lying completely inside the interior of $T$. You haven't really made this clear so I am unsure which copy of $S^1 \times D^2$ you're talking about. To be perfectly explicit, let's assume the radius of the $D^2$ in $T = S^1 \times D^2$ is $1$, while the radius in the $D^2$ in $A = S^1 \times D^2$ is $\tfrac{1}{2}$; the $S^1$'s in $T$ and $A$ are the same. Then we see that cutting $A$ out of $T$ amounts to "drilling out the core" of the solid torus $T$. If it helps, you can imagine $T$ as a jelly doughnut, $A$ as the jelly, and $T - A$ as the bread of the doughnut.

Now to glue in $B = D^2 \times S^1$, we need more information: *how* do we glue $B$ in? The instructions are encoded in a homeomorphism
$$\phi: S^1 \times S^1 \longrightarrow S^1 \times S^1.$$
In your case, $A \cong B$ (this doesn't happen for general surgeries), so if $\phi = \mathrm{Id}_{S^1 \times S^1}$, then we get our original $T$ back. If $\phi$ is a map that "twists" $S^1 \times S^1$ around its core $p$ times (in other words, if $\mu$, $\lambda$ are the standard meridionial and longitutinal generators of $H^1(S^1 \times S^1)$ and $\phi_\ast(\lambda) = \lambda + p \mu$), then the result of the surgery will be a lens space minus a solid torus: $L(p, 1) - S^1 \times D^2$ (this is just the standard genus $1$ Heegaard splitting of $L(p,1)$ except one of the solid tori is missing its core).

Here's an easier example. Take $M = S^2$, $p = 0$, $q = 3$. So we need to cut out a copy of $S^0 \times D^2$; this is just a pair of disks. Let these just be two small disks centered and the north and south poles of $S^2$. Now we glue back in a copy of $D^1 \times S^1$; this is just the surface of a cylinder. Using $\phi = \mathrm{Id}_{S^0 \times S^1}$ as our gluing map, the result of this surgery will be the torus (we've just glued the "handle" $D^1 \times S^1$ to our sphere). Note that this time when we used the identity map to glue we still got a new manifold. This is because $S^0 \times D^2$ and $D^1 \times S^1$ are different; in the first example $S^1 \times D^2$ and $D^2 \times S^1$ are clearly homeomorphic.