Payments which a professor or teacher who is a resident of one of the States and who is present in the other State for the purpose of teaching for a maximum period of two years in a university, college or other establishment for higher education in that other State, receives for such teaching, shall be taxable only in the first-mentioned State.