State tax filing

Thanks LenaH, I'm getting closer and need a tiny more of your expertise:

So for

  • 2021: Part-year resident of California and Part-year resident of Virginia  - - Q: For 2021 tax return "State of residence" I assume I answer with VA (since I'm maintaining an abode in VA now), and to "previous state" answer as CA?; then fill out VA state return first, then CA return to get proper CA credit?
  • 2022: Full-year resident of Virginia only - okay
  • 2023: Part-year resident of California and Part-year resident of Virginia (if you move back in 2023) - - Q: Reverse my 2021 steps: "State of residence" answer would then be CA - assuming I moved back in 2023; and say "previous state" is VA; then fill out CA state return first, then VA to get proper state tax credit?