The state you live in taxes all income worldwide but will give you a credit for tax paid to another state. Prepare your out of state return first. Then prepare your resident state.
The credit will be the lower of the state tax liabilities on the same gross income. You may owe your resident state, if they have a higher tax rate along with differences in how the taxable income is calculated.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"