Generally, nonresident returns calculate your tax based only on the income that was earned in the nonresident state (unlike resident returns, where your tax is generally based on all of your income, regardless where it was earned). Because the tax is based solely on the income that was earned in that state, you generally cannot take the credit for taxes paid to another state on the nonresident return.
Important: This credit is not simply a credit because you paid taxes to another state. It generally is only intended to be used to offset a tax liability that is calculated based on income that was taxed by another state.