1a) i) Let H represent a coin showing heads and T represent a coin showing tails. Count up the number of elements in your sample space and the number of ways you can win and then apply the formula P(E) = n(E) / n(S).
ii) Since the coins are tossed as many times as it takes to get either two heads or two tails, you can ignore the combinations HT and TH, so the number of elements in your sample space will change.