Slice it and crack it off. To me, It's not worth the time, trouble, damage, frustration, or cost. Find a new drive shaft of an appropriate length and make some chips. Guaranteed you'll need to use it more than twice.
^ This. I would never even consider hammering on or pulling on my tractor's PTO stub, without at least understanding how it's captured, since every one has different internals and different susceptibility to axial push/pull forces. Last thing you want to do is damage a ball or roller bearing that's not designed to take axial loads.
You said you had to hammer it on, which would have been the time to prevent this, they should always slide on easy. Whether it was a bent pin causing you to have to do that, a burr on your tractor's PTO stub, dirt, or just a badly made extender... who cares?
Cut the stupid pin assembly off the extender, and get the pin out. If it doesn't come loose after that, I'd try grabbing the PTO stub with a bearing splitter first, so that I'm only prying against the small collar that's machined right onto the stub. You never want to pull a stub by prying on the housing.
If bearing splitter fails, I'd probably try to figure out how deep the socket in the extender is (buy another and measure), then cut off 1/2" longer than that, drill and tap a hole in what remains, and use a bolt to "push" the extender off the stub like a gear puller.
Everytime I see people in these threads recommend prying or pulling on a PTO stub, I remember why I don't buy used tractors, anymore. Too many farmers thinking they're mechanics.
