The conditional probability formula is P(A | B) = P(A ∩ B) / P(A).
The two major elements of conditional probability are the probability of the (logically) prior event and the conjunction of the two events in question. In this case, the logically prior event is flipping heads. Ordinarily, this probability would be 1/2, but here we have some unfair coins in the mix. So we need to consider the ways that heads could be flipped and their corresponding probabilities.
When we make our initial selection, there is a 3/5 probability of selecting a fair coin and a 2/5 probability of selecting an unfair coin. So, consider flipping heads from a fair coin. The probability of selecting a fair coin is 3/5, and the probability of flipping heads on a fair coin is 1/2. So flipping heads on a fair coin has a probability of 3/5 · 1/2 = 3/10. Next we consider flipping heads on an unfair coin. The probability of selecting one is 2/5. The probability of this unfair coin flipping heads is 3 times the probability of flipping tails, so its probability is 3/4, and the probability of flipping tails on this coin is 1/4. So the probability of getting an unfair coin and flipping heads is 2/5 ·3/4 = 3/10. The total probability of flipping heads, then, is 3/10 + 3/10 = 3/5.
The other part is the conjunction of the two events. Happily, we have already done this calculation. It is the latter probability from choosing the unfair coin that is the conjunction of the two events, which is 3/10. Then we put our values into the formula:
(3/10) / (3/5) = 1/2.