State tax filing

Per the Virginia tax web site, I am required to file a part year resident return for my time prior to moving out of Virginia. AND I must file a nonresident return for my rental income while I was no longer a resident. I must file 2 returns for the a same state