Speedometer cable change

Are you trying to salvage the old one?

If not you could use vice grips on the outer sheathing at the base of the part that goes into the transmission and use a slide hammer to pull it out

Just have to ask ..

You did remove the clamp?

Most likely, IMHO, the rubber o rings is what is stuck in the trans.