During the state interviews it will ask you to allocate your income. Do the nonresident state returns first. Normally on your resident return you will get a credit for taxes paid to other states on the same income as your resident return taxes all income.
NM like CA do a total income approach and then allocate to get the NM %. It allows them to bump up your tax rate into a higher bracket. In some cases it can make you get less back in the tax credit paid to another state than what you actually paid. IMHO that is double taxation in that case and unconstitutional but that is my personal rant. Most cases you get all the tax paid to one state as a credit against your resident state. States like CA with high rates that do this basically steal from other states because it winds up being more that you would have paid if you earned it in your state. So states like NY don't give you a credit beyond what the NY tax would be (because NY does not feel like paying CA) and so the taxpayer gets double taxed. No one protects the small guy.