Bayes's rule and unfair coin | Solution Explanation 
There are three coins in a bag. Two of them are fair. One has heads on
  both sides. A coin selected at random shows heads in two successive
  tosses. 
What is the conditional probability of obtaining another head in the
  third trial given the fact that the first two trials showed heads.

I think this problem should be solved in the following way
$$P(one\ more\ head) = \frac{1}{3}\cdot 1 +\frac{1}{3}\cdot \frac{1}{2}+ \frac{1}{3}\cdot \frac{1}{2} = \frac{2}{3} $$
but my book says the right solution is
$$P(HHH|HH) = \frac{5}{6}$$
But the first two trials do not affect the third trial, so I should only have to calculate the probability of getting one more head, since I already have two.
Can anyone explain me what is going on?

Bayes' Rule says
$$P(A|B) = \frac{P(B|A)\cdot P(A)}{P(B)}$$
so in your question, it is
$$P(HHH|HH) = \frac{P(HH|HHH)\cdot P(HHH)}{P(HH)}$$
Now, notice that 
$$P(HH|HHH) = 1$$ 
because it simply says "if we know that three successive tosses are resulted in $HHH$, what is the probability that first two of them are resulted in $2H$".
For $P(HHH)$, we have
$$P(HHH) = \frac{1}{3}\cdot1+\frac{2}{3}\cdot \frac{1}{8} = \frac{5}{12}$$
because if we choose unfair coin with $\frac{1}{3}$ probability, we have $HHH$ with probability $1$ and if we don't choose it with $\frac{2}{3}$, we have $\frac{1}{2} \cdot\frac{1}{2} \cdot\frac{1}{2} = \frac{1}{8}$ probability to have $HHH$.
For $P(HH)$, by similar argument to $P(HHH)$, we have
$$P(HH) = \frac{1}{3}\cdot 1+\frac{2}{3} \cdot\frac{1}{4} = \frac{1}{2}$$
So the answer is 
$$P(HHH|HH) = \frac{1\cdot \frac{5}{12}}{\frac{1}{2}} = \frac{5}{6}$$
Now, when it comes to your argument "the first two trials do not affect the third trial", it is wrong in some manner. Because although it seems third trial is not affected by the first two trials, notice that whether we have fair or unfair coin affects probability of having $HH$ in the first two tosses. In other words, since $P(HH)$ differs from fair coin to unfair coins, probability of having a third $H$ is also affected by $P(HH)$, hence the first two tosses. 
