Where does it say that batting is from the spot? I just see where it says 10 yard penalty.
Bobby, you are correct, the first scenario is legal batting as it is not forward. It would be K's ball at the out of bounds spot. If he batted it forwards out of bounds, the only enforcement spot for a B foul during a free kick is the previous spot and re-kick, at least per NCAA.
The second scenario, the result of the play is not clear. My understanding is that the ball is batted from the end zone by team B back into the field of play and out of bounds. The other scenario is that the ball is batted from the End zone out of bounds behind the endline. Either way you have illegal batting in the EZ. But lets look at both scenarios.
The impetus for the ball being in the endzone is the fumble by A12. The muff by A88 does not add impetus as it is a muff. Team B's bat means nothign in regards to why the ball is in the endzone.
First Scenario: The result of the play is a fumble out of bounds at some yardline. Team A will accept the penalty and enforce the penalty half the distance from the the end of the related run, B18. If they declined, the ball would go to the out of bounds spot, if behind the spot of the fumble, or to the spot of the fumble if the fumble would be forward out of bounds.
Second Scenario: The result of the play is a fumble out of bounds beyond the endline resulting in a touchback. Team A must accept the penalty to keep the ball, which they will enforce half the distance from the end of the related run, the B18.