It can't happen in 1 toss. In 2 tosses, the first toss doesn't matter (probability 1), but the second must match the first (probability $\frac{1}{3}$), so it happens in 2 tosses with probability $1\cdot\frac{1}{3}=\frac{1}{3}$. In 3 tosses, the first toss doesn't matter, the second toss must not match the first toss ($\frac{2}{3}$), and the third toss must match one of the first two ($\frac{2}{3}$), so it happens in exactly 3 tosses with probability $1\cdot\frac{2}{3}\cdot\frac{2}{3}=\frac{4}{9}$. In 4 tosses, the first toss doesn't matter, the second toss must not match the first toss, the third toss must not match either of the first two tosses ($\frac{1}{3}$), and the fourth toss will match one of the first three no matter what (1), so it happens in exactly 4 tosses with probability $1\cdot\frac{2}{3}\cdot\frac{1}{3}\cdot 1=\frac{2}{9}$. Note that the sum of these three probabilities is 1, which confirms that there is no need to look past 4 tosses. The expected number of tosses is $2\cdot\frac{1}{3}+3\cdot\frac{4}{9}+4\cdot\frac{2}{9}=\frac{26}{9}$.