B gets to run the endline.
From the NFHS Basketball Interpretations
SITUATION #3: While A1's three-point field goal attempt is in flight, A3 fouls B1 (B is not in the bonus) near the bottom block area. The three-point field goal attempt is successful.
RULING: Score the three-point goal for A1. Team B will be permitted to run the end line on the ensuing throw-in. (5-7-7 Exp (2); 7-5-7)
I agree that the rule needs to be worded better.
But hey, there are a bunch of rules that need to be worded better.