I've received RR's rulings for following situations:
1. 4th and 10 on A-20. A8 legally punts the ball. B40 catches the punt on A-50 and advances to A-2, where he fumbles. The fumble goes out of bounds behind the team A goal line. Team A was in illegal formation at the snap.
2. 4th and 10 on A-45. A8 legally punts the ball. B40 catches the punt on B-3 and returns to Team B's end zone (no momentum), where he is downed. Team A was in illegal formation at the snap.
3. 4th and 10 on A-45. A8 legally punts the ball, but the punt is blocked by B96. A8 recovers the ball on A-30 (behind the line of scrimmage). Team A was in illegal formation at the snap.
Rulings:
1. The result of the play is a touchback, so Team B will not put the ball in play next. If they accept the penalty it can only be enforced at the previous spot and the down replayed. They clearly will want to do this.
2. The result of the play is a safety, and Team B would next put the ball in play by a free kick at the B-20. They could have the penalty enforced at that spot, and kick from the B-25, but of course they will want to have it enforced at the previous spot with the down replayed.
3. Team B will next put the ball in play at the A-30, so they will want the penalty tacked on at that point.