IMHO, you have a player illegally participating in the down. Regardless of what what he does during the down, it should only be considered one participation, so there should only be one foul. Since the participation began during a loose ball play, the penalty would be from the previous spot. B would obviously decline and keep the ball, but I can not see adding the penalty to the end of B's run, as it started before the change of possession.