Firstly, the status of the ball is still a legal scrimmage kick, and the ball is loose from the kick and beyond the NZ. Secondly, as such, the ball is dead when it is recovered by A97. So, all we have to deal with is the illegal batting foul by B99. (A80's dead-ball holding foul is ignored, since it is neither a personal foul nor an unsportsmanlike conduct foul.) If Team A declines the penalty for the Illegal Batting, then Team B will get the ball at the spot of the Illegal Touching (B-6). So, they will obviously accept the penalty.
B99's batting of the ball means that the ball was touched by Team B beyond the NZ, which is governed by 8-4-2-b-2. The illegal batting foul qualifies for Post-Scrimmage Kick Enforcement, so the Basic Spot for the penalty is the end of the kick (B-14). The Spot of the Foul (B-2) is behind the Basic Spot, so the penalty will be enforced 1/2 the distance to the goal from the Spot of the Foul, taking the ball to the B-1, where Team B is awarded a scrimmage series, and will next snap the ball.
B, 1/10, B-1, snap (25).
During our next crew meeting, we would discuss making certain that we know the status of the ball before dropping a foul marker for a non-personal foul or non-unsportsmanlike conduct foul. Process the action, then determine if the flag is warranted or not.