If you do the Federal return first and there was state tax for a different state withheld, that tax will be credited to your resident state if your resident states allows that, such as Michigan.
The tax may be limited to state withholding on earnings only, therefore some tax may not qualify, such as property tax and/or sales tax.
If you have a state specific question, please feel free to submit a new post.