I recently played Pai Gow poker. For those not familiar you are dealt 7 cards and you need to make two poker hands, one 2 card and one 5 card. You have to beat the dealer on both hands to win.
I was dealt the exact same 7 card hand as the dealer. This was a regular 52 card deck.
These problems are not difficult. It only requires a modicum of "logic" and a dollop of combinatorics.
I will place my attempt at an answer in a spoiler in case anybody else wants to post their own answer/approach (my answers are sometimes wrong).
Spoiler:
There are many approaches to answer such a question. Of course, they should all arrive at the same answer. I will ignore flushes in what follows. Incorporating the possibility of one or both players having a flush can be done, but I will leave that for others.
Break it up into cases of how many pairs each person has.
Case 1: Each player has the same 7 distinct ranks [1,1,1,1,1,1,1]