# slam-dunk or Kirby move

I have difficulty understanding the slam-dunk. In slam-dunk you have two knots K1 and K2 with framings r (rational) and n (integer) such that K1 is the meridian of K2. Now we perform surgery on K2 first and pull K1 into the solid torus glued in during surgery on K2. Is this not the same as second Kirby move? and if yes, why does the framing of K2 change after this operation?

The point of the slam-dunk is that it transforms a surgery diagram with two link components $K_1,K_2$ (satisfying the conditions you've already pointed out) to a surgery diagram with just the link component $K_2$ but with a different surgery coefficient. I believe the "second Kirby move" is called a 2-handle slide in Gompf and Stipsicz's book which is where I've learned this material. I may be misunderstanding your question or more likely, missing something, but a 2-handle slide doesn't change the number of components in your surgery diagram, whereas the slam-dunk does, so I don't see how to interpret the slam-dunk as a 2-handle slide.
Let $T$ be the solid torus glued in during surgery on $K_2$. Because the surgery coefficient of $K_2$ is integral, $K_1$ intersects the disk $\{\text{pt}\}\times D^2$ once, and so once you pull $K_1$ into $T$, it is isotopic to $S^1\times\{\text{pt}\}$ in $T$. This means that $T$ is a tubular neighborhood of $K_1$. Thus if we were to perform the surgery specified by the coefficient $r$ on $K_1$ now, we would again just cut out $T$ and glue it back in a second time.
What has happened is that the integral surgery coefficient of $K_2$ ensures that surgery on $K_1$ ends up working with the same solid torus $T$ -- in some sense $K_1$ has been moved into the same spot that $K_2$ was (though strictly speaking $K_1$ sits in a new manifold after surgery on $K_2$). This means that we could instead of doing two surgeries on $K_2$ then $K_1$ which end up involving the same $T$, just perform one on $K_2$, but with a different surgery coefficient.
To see what that surgery coefficient is, let's consider the case where $n=0$. There the first surgery on $K_2$ is simply a $\pi/2$ rotation of $H_1(\partial T)$. This changes the slope of surgery on $K_1$ from $r$ to $-1/r$. For general $n$, we have $n$ additional twists in this picture so we get $n-1/r$.