The sample space is the two possible outcomes of each trial: heads and tails.

The question boils down to the probability that the second trial will be tails and the third and fourth heads, with the first trial being either. The probability of this is one-eighth (0.125 or 12.5%).

To solve the more general problem of finding a probability density function for the number of trials needed, I would start with a geometric distribution and see what happens. (Although I think we'd end up with a negative binomial distribution.)

Good luck!