What was boat A doing? I doubt anyone would protest someone trying to shoot the mark and getting stuck in irons. If it was a muffed tack, then boat A doesn't have any rights, however, it also doesn't have any steering if its not moving, and B should probably drive around.
I had a similar situation last year. I was laying the mark on starboard, with a j-30 approaching on port. The j-30 was being singlehanded by a 60 year old man, so I kind of felt bad about not giving him room. I called for room, and he gave it to me but ended up in irons laying against the mark. The end result was that he moved the mark downwind about 2 boatlengths. All the guys behind me who were having trouble laying the mark because of shifting winds were eternally grateful to him. The end result was no protest, so I guess we and everyone behind us did the right thing.