This is a classic Markov chain problem. We can solve this problem by drawing out the tree of possible outcomes.
$$
$$
Let us denote the starting state $X$. From the starting state, we can either go down the branch of throwing a $H$ or a $T$ with equal probability. If we throw a $H$, and then another $H$, we are guaranteed to see $HHT$ before $HTH$. However, if we throw a $H$, and then a $T$, we will see either $HTH$ or $HTT$ with equal probability. If we throw $HTT$ then the game restarts, and we return to the state $X$.
$$
$$
Consequently, the probability of seeing $HHT$ first is double that of seeing $HTH$ first, and
$$
P(HTH \text{before} HHT) = \frac{1}{3}.
$$