The question: A biased coin (that is, one with an unequal chance of getting heads or tails) is tossed three times in a row. If the probability of getting two heads in a row and then a tails is 3/64 and the probability of getting two tails in a row and then a heads is 9/64, what is the probability of getting a heads on the fourth flip of the coin?
In the solution, it gives an equation which is this: 3x^2(1−x)=(1−x)^2 \times x
And I’m not too sure where the left side of the equation came from.
Can someone help me with this please?