Let $X$ be the random variable that counts the number of tosses until we get two successive tosses of the same type. Although you did not say so explicitly, I assume that you want the probability mass function of $X$.
What is the probability that $X>n-1$? We need to have a sequence of tosses of length $n-1$ and of type HTHTHT and so on (alternating heads and tails, starting with head), or THTHTH and so on. The probability that the first type of sequence is followed up to and including the $(n-1)$-th toss is $\frac{1}{2^{n-1}}$. The second type of sequence has the same probability, for a total of $\frac{2}{2^{n-1}}$.
The number $X$ of tosses is equal to $n$ if $X>n-1$ and the last toss matches the next to last toss. The probability of that is $\frac{1}{2}$, so
$$P(X=n) =\frac{2}{2^{n-1}}\cdot\frac{1}{2}.$$
This simplifies to $\dfrac{1}{2^{n-1}}$. Note that $n$ ranges over the integers that are $\ge 2$.
Another way: The first toss doesn't matter. After that, it is just a matter of matching the previous toss. So it is very much like tossing a fair coin and winning if you get (say) heads. The only difference is the "wasted" toss at the beginning. If we are tossing a fair coin, and $Y$ is the number of tosses until the first head, then $P(Y=n)=\frac{1}{2^n}$ ($n=1, 2, \dots$). But $X$ has the same distribution as $Y+1$. So $P(X=n+1)=P(Y=n)=\frac{1}{2^n}$, or equivalently $$P(X=n)=P(Y=n-1)=\frac{1}{2^{n-1}}\quad (n=2,3,\dots).$$
Generalization: Suppose that the probability of a head is $p$, and the probability of a tail is $q=1-p$. Either analysis of the problem can be extended to the more general situation. We win on the $n$-th toss if we did not win on the first $n-1$, and then the $n$-th toss matches the previous one.
It is convenient to split the analysis into two cases, $n$ odd and $n$ even. We do a full analysis of the odd case. So let $n=2m$. As is the first analysis, there are two ways to win on the $(2m+1)$-th toss. Either (i) we went HTHTHT and so on, with a tail on the $(2m)$-th toss, and then a tail again on the $(2m+1)$-th toss, or (ii) we went THTHTH and so on, with a head on the $(2m)$-th toss, and a head again on the $(2m+1)$-th toss.
The probability of (i) is $p^mq^m q$ and the probability of (ii) is $q^mp^mp$. Add them together. We get $p^mq^m(p+q)$, which is $p^mq^m$ ($m=1,2,\dots)$.
Next we deal with the case $n$ is even, say $n=2m$. The calculation is very similar to the previous one, so it will be omitted. The probability is the slightly more complicated-looking $p^mq^{m-1}p+q^mp^{m-1}q=p^{m-1}q^{m-1}(p^2+q^2)$, where $m$ ranges over the positive integers.
It is worth going through the effort of calculating the probability via the definition of conditional probability in early examples.
$$Pr(A\mid B):=\frac{Pr(A\cap B)}{Pr(B)}$$
Let $B$ be the event that the first coin flipped is not a head (i.e. the first coin flipped turned up tails).
Let $A$ be the event that the coin is flipped exactly three times.
We are tasked with calculating $Pr(A\mid B)$, the probability that the coin is flipped exactly three times given that the first flip did not turn up heads.
We can draw ourselves a tree diagram or however else we like to arrive at the following table of outcomes and respective probabilities:
$$\begin{array}{|c|c|}\hline\text{Outcome}&\text{Probability}\\\hline H&\frac{1}{2}\\\hline TH&\frac{1}{4}\\\hline TTH&\frac{1}{8}\\\hline TTT&\frac{1}{8}\\\hline\end{array}$$
It is worth taking a moment to check that this does in fact make sense as a probability distribution by verifying that the probabilities add up to exactly one. Indeed $\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{8}$ does equal $1$.
The event that the first flip is not heads corresponds to all of the above listed outcomes except the first and so occurs with probability $\frac{1}{4}+\frac{1}{8}+\frac{1}{8}=\frac{1}{2}$ so we learn that $Pr(B)=\frac{1}{2}$.
The event that the first flip is not heads and it takes three flips in total corresponds to the last two outcomes in the above table and so occurs with probability $\frac{1}{8}+\frac{1}{8}=\frac{1}{4}$ so we learn that $Pr(A\cap B)=\frac{1}{4}$.
Putting this information together, we get:
$$Pr(A\mid B)=\frac{Pr(A\cap B)}{Pr(B)}=\frac{1/4}{1/2}=\frac{1}{2}$$
Best Answer
Hints for (c)
To get the probability of five Hs by the third T, you need five of the first seven tosses to be Hs and two to be Ts, while the eighth toss must be T.
The distribution of the first seven tosses is binomial