The slots should have a bigger opening at one end or the other.
The old bolts will be able to be slipped over and pulled out through that bigger opening.
If one nut won’t loosen because the bolt also turns, grab the tip of the bolt with pliers, then you can turn the nut with another wrench.
You have a lot more cleanup to do on the metal ring (floor flange).
All the loose rust and crumbly junk and old wax has to come off.
The new wax ring will not seal against crumbly dry junk or old wax full of rust and crap.
If you are not sure how to proceed, call a pro.
If your floor flange is extremely rusted and too far gone, you might need a plumbing pro to repair or replace it.