The last vote cast must go to either $A$ or $B$. The question only cares about the two relevant candidates, so we can assume that there are a total of $m+n$ votes cast, $n$ of which went to $A$ and $m$ of which went to $B$. Thus, if we only look at the last vote, since each ordering is equally likely, the probability that it is one of these $n$ that went to $A$ is $\frac{n}{n+m}$.