Let
The probability that two headed coin is
The probability that biased coin is
The probability that unbiased on the coin is
The probability that head appears on the coin is
The probability that the coin is two headed, if it shows head that is
The probability for two headed coins is,
The probability that the head appear on the coin
The probability for biased coin is,
The probability that the head appear on the coin
The probability for unbiased coin is,
The probability that the head appear on the coin
Put these values in equation (1),
Thus, the required probability is