To remove a stripped out battery terminal bolt try using a pair of vice grips on the bolts head.
The vice grips should hold onto the battery terminal bolt that is stripped and then you should be able to remove the bolt.
Or you can also use a small pipe wrench that should help grasp the stripped out head of the battery terminal bolt and it should come out that away as well.
If you still can't get the battery terminal bolt out and the battery is bad then you can just cut the battery cable ends off and replace them with new battery cable ends.
Then install new battery terminal bolts.
But if it's just the head of the battery terminal bolt that is stripped out then using a pair of vice grips, locking pliers or a small pipe wrench should get the stripped battery terminal bolt out.
Then replace the battery terminal bolts with new ones.
Also remove the negative battery terminal bolt first to avoid sparking the battery terminals with the ground.