State tax filing

The use of "State A" and "State B" confuses the situation here because not all states have the same rules when it comes to how compensation income is taxed when RSUs vest.  Here's an article that explains the situation when moving from California:

https://www.upstartwealth.com/blog/will-you-owe-ca-tax-after-you-leave

and the Franchise Tax Board's guidance is discussed here:

https://www.ftb.ca.gov/forms/misc/1004.html#E-Restricted-Stock-

 

Perhaps you can find something similar for your states "A" and "B".