Ordinarily, penalties for roughing the passer are enforced from the dead-ball spot (NFHS) or end of the run (NCAA). But not if a change of possession occurs during the down.
In the MechaniGram, A1 is roughed as A2 catches the pass. But A2 fumbles and prone B3 recovers. As a result, the 15-yard penalty is enforced from the previous spot and team A is awarded a new series.
The enforcement would be the same if the pass was incomplete or if the last run ended behind the line of scrimmage. The codes agree (NFHS 9-4-4, 10-5-5; NCAA 9-1-9).