(b) In case the amount of tax actually paid by a resident of Alabama to another state or territory is in excess of the amount that would be due on the same income computed on the income tax rate in Alabama, then only such amount as would be due in this state on such taxable income shall be allowed as a credit.