I mean exactly the same two cards e.g. A♥ and 5♠, not just any A5 off suit.
The way to figure this this type of question out is card by card. So the first card in the second hand is 2 in 52 (It can match either of the cards in the previous hand). × 1 in 51 ( it has to match the card that was not matched by the first card and there are 51 choises left). So 2 in 52 = 1 in 26 x 1 in 51 = 1 in 26 x 51 = 1 in 1326
To understand how to calculate these types of questions yourself, here is how you would do it:
Since this hand could be dealt two ways (A♥ and 5♠ or 5♠ and A♥) and be the "same hand" for the purposes of poker, you would need to be dealt either of those two cards on the first hole card that you receive and the other card on the second hole card that you receive.
To calculate the likelihood of being dealt a specific hand once (and in this case, the "specific hand" would be "the same hand that I was dealt last time), the math looks like this:
Then, the odds that a particular, predetermined hand will be dealt two hands in a row would be the odds of it being dealt the first time multiplied by the odds of it being dealt on the second hand (the same):
Also known as: 1,758,276 to 1 (which is the answer to your question).