Get your taxes done using TurboTax

Generally speaking, you owe income tax to state A for income that was earned or paid to you while you lived in state A, and you owe income tax to state B for income that was earned or paid to you while you lived in state B.  You will file a part-year resident return for state A and a part-year resident return for state B. Turbotax will ask you to allocate your income to each state (it doesn't do this automatically).  Your TSP withdrawals would be taxed to whichever state you were living in when you made the withdrawal.

 

The date you stopped being a resident of state A will not be the date you bought the house in state B, it will be the date you moved out of state A and stopped being a permanent resident there.