Note: This solution is best read in conjunction with the solution to puzzle 19.
Number the cards in the deck 0 through 123: c0 < c1 < c2 < c3 < c4. A selects card ci to hand back to the audience member, where i = c0 + c1 + c2 + c3 + c4 (mod 5.)
Now, suppose the four remaining cards sum to s (mod 5.) Since all five cards sum to i (mod 5), ci , the hidden card, must be congruent to −s + i (mod 5.) Therefore, if we renumber the cards from 0 to 119 by removing the four retained cards, the hidden card's new number is congruent to −s (mod 5.)
From here, there are exactly 24 possibilities remaining for the hidden card. These can be conveyed by permutation of the four retained cards.
Source:
The best card trick, in Mathematical Intelligencer 24 #1