The ball belongs to team B at the end of the down. Team B did not foul before last gaining team possession. Thus, team B may elect to decline offsetting fouls and decline team A illegal formation foul. If they do that, though, team A will decline the clip, and the result of the play is a touchback. 1st and 10 for team A at A-20.
Team B may want to take offsetting fouls, 3/5 from B-45.
If you argue that the ball belongs to team A at the end of the down, there is no option, offsetting fouls.