Bummer.
A few questions…
1) Is the boat in the water?
2) what kind of stuffing box do you have?
3) is the prop shaft free to slide back from the transmission?
4) are you planning to replace shaft coupling, prop shaft, anything else?
Normally you would want to remove the nuts, because there is insufficient clearance (I suspect) to drive the bolts out towards the transmission. So that leaves you with moving the shaft coupling away from the tranny.
The shaft will need to be free to slide back some, so if you have a zinc on the shaft in a place that prevents the shaft from sliding aft, you will need to remove those. Same with the stuffing box. It should be loose enough for the shaft to move back. After that, I think you are left with trying to wedge something between the 2 couplings and see if you can drive them apart.
I would probably not want to do this in the water, and I suspect that if the shaft coupling is that bad, you won’t be able to get it off the shaft, and you may eventually have to replace the shaft too.
I did this job a few years ago…fortunately for me, 2 of the coupling nuts had fallen off before I started

.
I struggled more getting the shaft coupling off the shaft. But in the end, I needed to replace the shaft, so I could have saved myself a lot of trouble and could have just cut the shaft in pieces to get it out. This won’t help in your case though, because you still need to separate the couplings.
Good luck!
Greg