A draws a card from a pack of n cards marked 1,2,……n. The card is replaced in the pack and B draws a card.
Then the probability that A draws a higher card than B is
lf A draws card higher than B, then the number of favorable cases is (n - 1) + (n -2)+ ... + 3 + 2 + 1
(as when B draws card number 1, then A can draw any card from 2 to n and so on).
Therefore, the required probability is