Defer class date at A until you interview with B. It’s only two weeks. If you get the offer at B and decide to go there, you’ll have save much more seniority than if you wait.
Do not quit A in the circumstance until you know you have a guarantee from B, which is two weeks notice at A from your start date with B. Train at A until then, as they are your only employer and you owe them your loyalty until you give notice.