7-2-1 After the ball is marked ready for play, each player of A who participated in the previous down and each substitute for A must have been, momentarily, between the 9-yard marks, before the snap.
Note that this does not say BEFORE the RFP. This has nothing to do with B's ability to sub his players.
You got it right.