<s>[INST] Two fair coins are tossed until both turn up heads A penny and a dime are tossed together until both turn up heads, after which no more tosses are made. Find the expected number of times the penny comes up heads.
What I've tried:
Let $X$ and $Y$ be the number of times the penny and dime come up heads, respectively. Then, for $x = 1,2,3,\ldots$
$$P(X = x) = \sum_{y=1}^\infty P(X = x, Y = y) \\ = \sum_{y=1}^x P(X=x,Y=y) + \sum_{y=x+1}^\infty P(X=x, Y=y) \\ = \sum_{y=1}^x \sum_{n=x}^\infty \left( \frac{1}{4} \right) \binom{n-1}{x-1} \left( \frac{1}{2} \right)^{n-1} \binom{n-1}{y-1} \left( \frac{1}{2} \right)^{n-1} + \\ \sum_{y=x+1}^\infty \sum_{n=y}^\infty \left( \frac{1}{4} \right) \binom{n-1}{x-1} \left( \frac{1}{2} \right)^{n-1} \binom{n-1}{y-1} \left( \frac{1}{2} \right)^{n-1} \\ = \sum_{y=1}^x \sum_{n=x}^\infty \left( \frac{1}{4} \right)^n \binom{n-1}{x-1} \binom{n-1}{y-1} + \sum_{y=x+1}^\infty \sum_{n=y}^\infty \left( \frac{1}{4} \right)^n \binom{n-1}{x-1} \binom{n-1}{y-1}$$
Is there a way to simplify the above expression? Or is there an easier approach that I'm missing?
 [/INST] Yes, there is an easier way.  Suppose the expected number of times the penny comes up heads is $x$.  Then consider the outcome of the first pair of tosses:  if both come up heads, $x = 1$, with probability $1/4$.
With probability $1/2$, the penny comes up tails.  Regardless of the outcome of the dime, we don't stop; but since the penny came up tails, this toss also doesn't count toward the total number of times the penny comes up heads--so in this case, it is as if the toss never occurred.
In the remaining case, with probability $1/4$, the penny comes up heads but the dime comes up tails.  We don't stop, but now the penny has shown a head and for the remaining tosses, we can reason that the expected number of heads shown by the penny is still $x$, because the outcome of pairs of tosses are independent of previous tosses--the coins don't "remember" what they did before.
To summarize, we must have $$x = \frac{1}{4}(1) + \frac{1}{2}x + \frac{1}{4}(x+1).$$  This gives $x = 2$ as the expected number of heads seen from the penny.

For your own benefit, you should consider how this problem generalizes to the case where the probability of the penny showing heads is $p_1$, and the dime's probability of showing heads is $p_2$.  What is the expectation in terms of these probabilities?
For even more understanding, can you compute the probability distribution of the random number of heads obtained from the penny (in the fair case, $p_1 = p_2 = 1/2$)?  What is it?  Why does it make intuitive sense?  Can you use this result to formulate an alternate method of solution?
</s>