The problem described in the Question, to determine exactly the opponent's fixed sequence of heads and tails, is not fully formulated because it needs some probability distribution for the sample sequences drawn by the player.
Given that probability distribution, one can ask the expected number of trials until the hidden sequence is determined. For some (trivial) distributions it will be impossible to make that determination, e.g. if all the drawn sequences are tails only, then all that can be known is what the split of the ten coins is between heads and tails.
Of a more combinatorial nature is how to extract information from the samples that are drawn. One way to think about it is in terms of the set of possibilities for the hidden sequence. In this connection having zero matches (or ten matches) would be ideal, because the exact sequence is uniquely determined.
In general getting $k$ matches will imply that there are $\binom{10}{k}$ possible solutions. Once the intersection of those subsets of possible solutions has a single common sequence, the problem is solved.
Let's consider how much information can be extracted from the example given in the Question. The first sample:
TTTHTHTHHT
gives five matches, and the second sample:
THHTTTHTHT
has only three matches.
Therefore in looking at the positions where there was a change:
T***T***HT
we know that two matches were lost (two that matched in the first sample but did not match in the second sample). So at least two of the five matches in the first sample are in those six "*" (changed) positions. Similarly at most three of the five matches in the first sample are in the four unchanged positions.
But more can be deduced from the net change of $-2$ matches from the first sample to the second sample. If the first sample has $k$ matches in the six changed positions, then the second sample would have $6-k$ matches there (since all have changed, and there are only heads or tails). So that would give us a net change of $-k + (6-k)$, and in order for this to be $-2$, we require $k=4$.
This reduces the number of possible solutions accordingly. The first sample alone gives $\binom{10}{5} = 252$ solutions. The second sample alone gives $\binom{10}{3} = 120$ solutions. Combining them gives us just $\binom{6}{4} \cdot \binom{4}{1} = 60$ possible solutions (pick four of the six changed positions for matches in the first sample, and one of the four unchanged positions for the final fifth match in the first sample).
Best Answer
Let's pretend the bag is very large, so drawing one bean of a flavor doesn't change the probabilities. There are $50^6$ possible draws, all the same probability. The ways to get exactly $3$ of a flavor can be counted as $\binom 63=15$ choices for which $3$ will match times $50$ choices for which flavor to match times $49^3$ for the other $3$. There is a tiny error as we double count the case you get two three of a kinds. So the chance is $\frac {15*50*49^3}{50^6}=352947/62500000 = 0.005647152$ or about $1$ in $177$.