The reason we would not normally shoot the free throws is not because they are not merited, it is because they do not affect the outcome of the game, per NFHS 5-6-2 Exception 3: "...No free throw(s) shall be attempted after time has expired for the fourth quarter or any extra period, unless the point(s) would affect the outcome of the game."
But once the coach interjects himself into the OP's situation, the outcome of the game is no longer decided. So we do what we always do which is penalize the fouls in the order they occurred. A1 gets his free throw, then any eligible player(s) from B shall attempt the free throws for the T. If at any point during that process the game again becomes decided (e.g., A1 makes his free throw and B misses the first), then we stop. Otherwise, we shoot them all, and if the game is tied, we go into overtime.
Which brings up the next question. If we go into overtime, and the last foul was the T on A's coach, does OT begin with a jump ball or an AP throw-in?