The president and vice president can be from the same state, but…..
The 12th Amendment to the Constitution says this about casting electoral votes: “The Electors shall meet in their respective states, and vote by ballot for President and Vice-President, one of whom, at least, shall not be an inhabitant of the same state with themselves…”
This could present a problem. In a hypothetical, let’s say a presidential and vice presidential candidate were both from Texas, and that ticket won the popular vote in Texas. When the electors from Texas meet to cast their electoral votes, they will not be able to vote for both the winning presidential and vice presidential candidates since they have to cast at least one vote for someone from a state other than their own.
Texas has 38 electoral votes, a sizable amount. In this hypothetical dilemma, electors in Texas would most likely cast their vote for president for the candidate who won, but vote for someone else for vice president, since they can’t cast both votes for someone from Texas. That could result in no one getting a majority of the total electoral votes for vice president, sending the election to the Senate. Depending on the makeup of the Senate at that time, it’s possible someone else would end up being vice president.
This is exactly why, in 2000, Dick Cheney changed his “official residence” from Texas to Wyoming when he ran for vice president with George W. Bush, who is from Texas.