I have a sequence of 6 letters containing two P, two R, one Q, and one S.
I have PPQ. Now I have to add two R and one S in that; these can be placed anywhere. There will be in total $60$ possible ways to do that since $\binom62 \cdot \binom41=60$. I want to know the number of sequences that have exactly 1 flip, 2 flip.
Flip here refers to alternating R and S. For one flip, the sequence may look like PPQRRS, PPQSRR, RPPQRS,RRPPQS, RRPSPQ..., etc. The flips will depend only on previous R and S and not on P and Q. The order of PPQ should remain the same for all the sequences; R and S can be inserted anywhere in PPQ.
Since we have 3 spaces for the letters R, R, S and 3 dividers (P, P, and Q), there are $\binom{6}{3}=20$ ways to arrange the spaces for the letters R, R, and S.
If we put the S in the 1st or 3rd spaces, we get a 1-flip sequence; and if we put S in the 2nd space, we get a 2-flip sequence.
Therefore there are $20\cdot2=40$ 1-flip sequences and $20\cdot1=20$ 2-flip sequences.