You pay tax in both states. The income you earn in each state is taxed by that state. It doesn't matter whether it's on the same day or different days. The payment of tax is determined by where you earned the income, not day by day. If you work in two states in one day, you pay tax to both states, on the income that you earned in each state.
All your income is taxed by the state that you live in, no matter where you earn it. In most cases your tax return for the state that you live in will give you a credit for tax that you pay to other states. To be able to give you more specific information, we would need to know the particular states involved, and which state you live in.
The general rule is you pay tax to the non resident state on the income you earn there. You also pay tax on ALL your income to the resident state, but get a credit (or partial credit) for the tax you paid to the non resident state.
But it depends on the circumstances and the states. Man neighboring states have "reciprocal agreements" on wages, and it is not necessary to pay tax to the non resident state.
Also see this about business Trips. http://money.cnn.com/2013/06/28/pf/taxes/business-traveler-tax-threat/ If you live in a state without an income tax (e.g. FL or TX), it’s more likely you should file in the work states. You can't use the "it all comes out even" rationale for not filing.
it also depends on whether your an employee who will get a W-2 showing wages for both states or only one.
if it shows 2 states it is possible that the income for one state is below the filing threshold. However, to get back any withholding you would need to file. If the refund you would get is small, you may just want to forget about it because the cost for TT second state return and e-filing could easily exceed the refund.
as an independent contractor, you income again your income in the second state could also be below the amount required to file a return
I'm assuming the first state is your resident state.
if you tell us the name of the second state we can lookup the filing requirements or you could do it yourself by type in your browser - ""state" department of revenue". then go to the state website and look for nonresident return instructions.