Coin flipping problem

Question

Hints

Answer