Whenever a taxpayer, other than a resident of the Commonwealth, has become liable to income tax to the state, county or city where he resides, upon his net income for the tax year, derived from sources within this Commonwealth and subject to taxation under this act, the department shall credit the amount of income tax payable by him under this act with such proportion of the tax so payable by him to the state, county or city where he resides as the income subject to taxation under this act bears to his entire income upon which the tax so payable to such other state, county or city was imposed: Provided, That such credit shall be allowed only if the laws of said state, county or city--
72 P.S. § 3402-310