If there are n items and r of them are alike(nondistiguishable), the different no. of arrangements of these n items will be n! / r! where n!=1.2.3...n

For example if there are four letters A,B,C,D then different no. of arrangements will be

4!=1.2.3.4=24. But if two of them are alike, ie if the letters are A,A,B,C then the different no. of arrangements will be reduced to 4! / 2! because now no need to consider the internal arrangements of two A's.

In your example, the no. of different arrangements will be 6! /(3!*2!), since there are three A's and two B's.