AIME 1986:different sequences of coin tosses AIME 1986 Problem-13

In a sequence of coin tosses, one can keep a record of instances in which a tail is immediately followed by a head, a head is immediately followed by a head, and etc. We denote these by TH, HH, and etc. For example, in the sequence $\text{TTTHHTHTTTHHTTH}$ of 15 coin tosses we observe that there are two HH, three HT, four TH, and five TT subsequences. How many different sequences of 15 coin tosses will contain exactly two HH, three HT, four TH, and five TT subsequences?

The solution given in AoPS states something about switching T to H.They note that adding  HT or TH to a string switches the last coin.I don't understand what switching coins  mean .A clear explanation will be very much appreciated.
 A: Ok, so let us assume we have a sequence of coin tosses, say $TTTHHTHTTTHHTTH$.
The crucial way to look at it this is counting the number of places where a $T$ changes into an $H$ or the other way around.
In that particular sequence, $H$ changes to $T$ exactly $3$ times and $T$ changes to $H$ exactly $4$ times, let us use colors to see this:
$$TT\color{green}{TH}H\color{green}{TH}TT\color{green}{TH}HT\color{green}{TH}\tag{1}$$
$$TTTH\color{blue}{HT}\color{blue}{HT}TTH\color{blue}{HT}TH\tag{2}$$
In $(1)$ all the places, where $T$ changes into $H$, i.e. where $T$ is followed directly by an $H$ are green. In $(2)$, the changes from $H$ to $T$ are colored blue.
Now suppose you had any sequence which contains exactly two $HH$, three $HT$, four $TH$, and five $TT$ subsequences.
How often does $H$ change to $T$? Well, whenever $H$ changes to $T$, that is a $HT$ subsequence. So exactly $3$ times.
How often does $T$ change to $H$? Same, story. That's a subsequence $TH$, so exactly four times.
So if you now eliminate from your sequence all the double occurrences of $T$ and $H$, then you obtain a sequence where after every $T$ there is an $H$ and after every $H$ there must be a $T$ and at the same time there is $4$ $TH$'s and $3$ $HT$'s. So the only possibility for our "$TT$-and-$HH$-eliminated" sequence is $THTHTHTH$.
Let us illustrate this in the above example:
$$
\begin{align}
& TTTHHTHTTTHHTTH\\
=& T\color{red}{T}\color{red}{T}H\color{red}{H}THT\color{red}{TT}H\color{red}{H}T\color{red}{T}H\\
\longrightarrow& T\color{white}{T}H\color{white}{H}THT\color{white}{TT}H\color{white}{H}T\color{white}{T}H = THTHTHTH
\end{align}
$$
Now we do we have to do to make $THTHTHTH$ again into a sequence of $15$ coin tosses, which contains two $HH$, three $HT$, four $TH$, and five $TT$ subsequences?
We just have to insert two $H$'s and five $T$'s at places where they don't alter the number of $HT$ and $TH$ sequences. That is, we can insert the $H$'s only behind (or in front, that's the same) existing $H$'s. How many different places are there? Four! The $H$'s are indistinguishable and the order in which we insert them is irrelevant.
So this is like we have to throw $2$ identical balls each into one of $4$ urns and we wonder how many different possibilities there are. But this is a basic counting problem of which we know that the solution is ${2+4-1\choose 4-1}=10$.
The same counting principle goes for the $TT$'s, so we have ${5+4-1\choose 4-1}=56$ possibilities to throw in the $T$'s.
Altogether that makes $10\cdot 56=560$ possibilities.
