Probability of getting heads given a particular coin q is: P[H|Q=q] = q PDF of Q = 2q
Therefore P[H1|Q=q] = q P[H1|H2] = P[H2 intersection H1]/P[H1]
P[H1] is the integration from 0 to 1 of P[H1|Q=q] x PDF of Q, which turns out to be 2/3.
P[H2 intersection H1] is the integration from 0 to 1 of (q^2) x PDF of Q, which equals 1/2.
Therefore, plugging the above answers into the conditional probability formula will give the probability of H2|H1.