I'll take a stab.
3-5-3b
Team B is allowed to briefly retain more than 11 players on the field to anticipate the offensive formation, but it may not have more than 11 players in its formation if the snap is imminent. Whether the snap is imminent or has just occurred, the officials shall stop the action. (A.R. 3-5-3-IV)
PENALTY [a-b]—Dead-ball foul. Five yards at the succeeding spot.
3-5-3cIf officials do not detect the excessive number of players until during the down or after the down is over, or if Team B players have entered the field just before the snap but have not been in the formation, the infraction is treated as a live-ball foul. (A.R. 3-5-3-V-VI)
PENALTY—Live-ball foul. Five yards at the previous spot.
For both scenarios, 2/15 at A30. Clock was stopped, so play resumes on the snap, 25 PC on R's signal.
second one:
by rule, A1 is allowed to recover and advance the ball (and therefore can pass the ball)
3-3-1a
ARTICLE 1. a. A scrimmage kick that fails to cross the neutral zone continues in play. All players may catch or recover the ball behind the neutral zone and
advance it (A.R. 6-3-1-I-III).
So unless I'm missing something, since it was recovered 6 yards behind the LOS, this is a legal play. Clock stops momentarily for chains to reset, but since there is less than 3 seconds, rule 3-2-5 comes into play, which says that with two or less seconds on the clock, spiking to preserve clock is not allowed, therefore game is over.
ARTICLE 5. If the game clock is stopped and will start on the referee’s signal with three or more seconds remaining in the quarter, the offense may reasonably expect to throw the ball directly to the ground (Rule 7-3-2-f) and have enough time for another play. With two seconds or one second on the game clock there is enough time for only one play. (A.R. 3-2-5-I)