You need to edit the original post as you switched around B2 and Team B with A2 and Team A near the end.
That said, this exact play is an issue of contention amongst referees. When the backcourt rule had three specific exceptions, this scenario would not qualify as one of them. However, since the rewrite of the backcourt rule, there is now a solid case to be made that the words as written in the rules book allow B2's action to be legal, since his team was not in control at the time that he became an airborne player.
BktBallRef and I have had a good discussion of this already on this forum. I'll see if I can find the old thread and post the link. Here it is:
Throw-in/Backcourt violation?
The bottom line is that if the official believes this is a violation then Team A gets the ball and there was nothing wrong with the whistle. However, if the official believes that this is a legal play, then Team B had control at the time of the accidental whistle and gets to keep the ball via the POI rule.
So not only do I question the rules knowledge of the officials on this game, but they also failed their course in logic.