a) Try finding a pattern.

P(Tom wins at 1st toss) = P(2 heads) =

P(Tom wins at 2nd toss) = P(first toss give a head and a tail, second toss gives two heads) =

P(Tom wins at 3rd toss) = P(1st Head/Tail, 2nd Head/Tail, 3rd 2 heads) =

You see the pattern? You're multiplying by [(1/2 x 1/2) + (1/2 x 1/2)] after each successive toss.

The probability that Tom wins at the 2nd toss, or the 1st toss is P(win 1st toss) + P(win 2nd toss)

Hence, P(win at or before nth toss) = Sum of all probabilities up to nth toss.

This is a geometric sum, with starting term 1/4, common ratio 1/2.

Spoiler:

b) I'm afraid I don't quite understand what part b) is asking for... must be my english

EDIT: I think I understand, but not sure. If this means that the game ends at or before the nth term, that is either Tom or Bob wins, then you only multiply by two, since

P(either Tom or Bob wins at nth toss) =

Spoiler: