Which outcome occurs first?

Two of the possible outcomes of an experiment are and , with probabilities and respectively and . If the experiment is repeated until either or occurs, what is the probability that is the first to occur?

My first thought was to work on a convolution of two geometric R.Vs. (ie number of trials since a occur, number of trials since b occurs) but these obviously are not independent since they cannot occur simultaneously.

The solution says: "One can either workk on the joint distribution of the numbers of trials until the first and occur, or decompose in terms of the outcome of the first experiment." but I can't work out what it means.

What is the joint distribution? The outcome of the first experiment can be a, b, or something else -- how do I decompose that?

I'm feeling pretty stupid right now. Any help would be appreciated.