Also appropriate to this scenario is 7-2-1, "after the ball is marked ready for play, each player of A... and each substitute for A must have been, momentarily between the 9-yards marks (Numbers in some cases) before the snap. Illegal formation, 5 yards. I know of no such restrictions for B.
3-7-6 refers to entering during the down, not prior to the snap as in this case.