Remote Working Plus a Relocation

I am struggling to figure out using TurboTax how I file my state income taxes...here is my situation:

Lived in Missouri January - August 2021

- Made small amount of income from Missouri based company in January; paid income taxes to MO

- Hired into a new company in Massachusetts and worked remotely from Missouri due to Covid (delayed relocation); paid income taxes to MA

 

Then in August, moved to Massachusetts and continued to make income in MA.

 

I know I have to file in both MO and MA...but I am trying to figure out how not to be double taxed on the same income.  When I try to use MO-CR to get a credit for income taxes paid to MA, I am not clear on how to fill it out since I lived in MA mid Aug - December 2021.

 

Thanks for any help you can give.  I called MO tax number and they say they don't know - what the heck!