I changed permanant address twice during the year

I changed pernant address from Missouri to Kansas around August 2020, then moved back to Missouri on December 2020. I commuted to Missouri for working when i lived in Kansas. Should i file resident for Missouri and nonresident for Kansas? or part year resident for both state?

 

Should i say "Yes" for the question if you lived in other state?