If it's ruled B2 illegally batted the ball, the flag is dropped at the A 15. The result of the play is a touchback.
A can accept the result of the play and take the ball at the 20.
A can accept the penalty, 15 yards from the previous spot, 1st and 10 from the A 38.
If it's ruled that B2 was just trying to pick the ball up and accidently knocked the ball into the end zone, it's a touchback.