Suppose that A wins in exactly m+r games; to do this he must win the last game and m−1 out of the preceding m+r−1 games. The chance of this is m+r−1Cm−1pm−1qrp, or m+r−1Cm−1pmqr.
Now the set will necessarily be decided in m+n−1 games, and A may win in exactly m games, or m+1 games, ....., or m+n−1 games; Therefore we shall obtain the chance that A wins the set by giving to r the values 0,1,2,....n−1 in the expression m+r−1Cm−1pmqr. Thus A's chance is
pm{1+mq+m(m+1)1.2q2+....+⌊m+n−2⌊m−1⌊n−1qn−1};
similarly B's chance is
qn{1+np+n(n+1)1.2p2+....+⌊m+n−2⌊m−1⌊n−1pm−1}.