My attempt on the problem:
X X X X = 26^4 number of ways the strings can be made
A A X X = 26^2 number of strings with two A's in them
B B X X = 26^2 number of strings with two B's in them
B B A A = 1 way the string is duplicated
A A B B = 1 way the string is duplicated
Then if I do 26^4 - 26^2 - 26^2 - 1 - 1, I should be able to find the number of strings.
I believe this is right but I'm not entirely sure. Opinions would be greatly appreciated.