Article II, section 1 of the Constitution:
The executive Power shall be vested in a President of the United
States of America. He shall hold his Office during the Term of four
Years, and, together with the Vice President, chosen for the same
Term, be elected, as follows:
Each State shall appoint, in such Manner as the Legislature thereof
may direct, a Number of Electors, equal to the whole Number of
Senators and Representatives to which the State may be entitled in the
Congress: but no Senator or Representative, or Person holding an
Office of Trust or Profit under the United States, shall be appointed
an Elector.
The Electors shall meet in their respective States, and vote by Ballot
for two Persons, of whom one at least shall not be an Inhabitant of
the same State with themselves....In every Case, after the Choice of the President, the Person having the greatest Number of Votes of the Electors shall be the Vice President.
Nothing in there about the President and Vice-President being from different states, just that no elector can pick both a President and a Vice-President from the same state as the elector. The Twelfth Amendment modifies this to specify distinct votes for President and Vice-President, but retains the same "not the same state" clause.