If we call the elements for A and B, then one particular ordering would look something like the pattern AABAAABBABABA...A such that there is 20 of each A and B, and you would like to know how to count how many of such different orderings there are.
Try first think about what constitutes a different ordering. Would you get a different ordering if you swap two A's? two B's? an A and a B? If we assume you conclude you can swap two A's and two B's (but not an A and B) without getting a different ordering, then think about how you can give a "minimal" description of one particular ordering such that your description would be different exactly when the pattern would be different. For instance, think how, in as few words as possible, you would tell a friend over the phone such that he could write down the same pattern you have. Hint: you may want to try think of the 20 A's and B's as as a stack of cards, say 20 black and 20 red, that have to be interleaved (i.e. shuffled without reordering).
Once you have such a minimal description think about how you can use this to calculate the number of different descriptions, which then would be the same as the number of different pattern orderings.