How do I fix this toilet flange?
The metal ring (in fact the whole flange unit) looks like it was perfectly fine... until you got to it. The exception is that it does not appear to have been screwed to the floor, which is necessary for stability.

I think your problem of "the bolts no longer stayed inside" may have had to do with misunderstanding how closet bolts attach, rather than a damaged ring.

It will be very difficult, at this point to remove the remains. I strongly recommend that you screw the ring directly to the floor, as it should have been originally, and go ahead and install the toilet using that wax ring you have. Make sure you understand how to properly use those bolts to attach the toilet. 

If the floor beneath is ceramic tile on concrete you would need to drill into it and use appropriate anchors for the screws (I would use lead anchors and stainless-steel screws). If it is vinyl tile (or ceramic tile on plywood or backer-board) you could drill through it to the wood subfloor and screw into that.

If I were doing it, I would buy an extra wax ring and pack wax into the voids between the plastic flange body and your new ring (warm the wax in the sun or with a hair dryer).