I think the penalty is not declined by rule in this instance. Team possession has not yet changed so the penalty should be enforced as per a regular down. Illegal batting by the team not in possession is enforced from the basic spot and the basic spot here is the previous spot. So, assuming the try was from B-3, we enforce half the distance to B-1.5, repeat the try.
You can think of it this way: assume that the illegal batting happened at B-4 with a team A player about to recover with a clear field to advance the ball into the end zone for two points. Should team B benefit from the foul?