Why do I owe in one state but not owe or get a return in another after I lived in two states

Also, my employer did not change my info so state 1 was still taxing me even though I lived in state 2