How do you file taxes if you worked in 2 different states?

One federal 1040 income tax return combining the income from both state on it.

Your nonresident or part year resident state tax return and your resident state income tax return filled out correctly and you may get a tax credit on your resident state income tax return if you had to to pay any income tax to the nonresident state if the returns are completed correctly.