Given a string of n distinct characters, then the number of possible transpositions is exactly n(n-1)/2.
For example, AB is a string of two distinct characters. So n=2. Put that in the formula and you get 2(2-1)/2 =1. That's right, isn't it?
There is only 1 possible transposition for the string AB, which is BA.
Again, ABC is a string of three distinct characters. So n=3. Put that in the formula and you get 3(3-1)/2 =3. I'm right again.
So from ABC there are only 3 possible transpositions:
BAC
ACB
CBA
Here's a homework assignment for you. Check my formula for 4 distinct characters by listing all the possible transpositions to ABCD. There should be 4(4-1)/2 = 6 of them.
6
Yah