What to do when my only W2 shows AZ state taxes, but I worked in MO state

Hi, 

I worked for a large company from 1/1/22 to 7/13/22 in Missouri, then laid off. I moved to Arizona on 8/3/22 and lived with family while looking for a job. I did not earn anything in Arizona. My W2 shows only Arizona wages and tax withholding, nothing for Missouri. I am filing as Single. 

Should I file taxes only in AZ, or only in MO, or in both states? Did my employer make a mistake in the W2? It seems I come out ahead if I file only in AZ.

Thanks!