The total number of letters is 7, so 7! (7*6*5*4*3*2*1) goes in the numerator. You look for any duplicate letters (in this case, there are 2 a's and 2 e's) and so 2!*2! goes in the denominator.
Thus there are `(7!)/(2!2!)=1260` ways to rearrange the letters.
To see why this is so, let's take a word with no duplicate letters, say "median"
There are six choices for the first letter of the word (m,e,d,i,a,n). Then, once you pick the first letter of the word (say d), there are only five choices (m,e,i,a,n) left for the second letter of the word. Once you pick the second letter of the word (say, n) there are four choices left for the third letter (m,e,i,a). And so forth, until the last letter, when there is only one "choice" left, the remaining letter. So there are 6! ways to rearrange the letters.
Now, let's say average was actually spelled "AvErage" (with a capital A and E, so we could tell the difference between the first a and the second a, and the first e and the second e). If we think of the "A" and the "a" (and the e and the E) as being different, there are 7! ways to rearrange the letters.
But then we are counting
AavErge and aAvErg
as different words, when really, both are just "aavErge". And really, we don't want to distinguish between those two a's. We have "double counted" every word, once with the capital A first and once with the lower case a first. So we divide by 2. Similarly, we are now counting
aavErge and aavergE
as different words. So we are double counting again, once with the capital E first and once with the lower e first. So we again divide by 2.
So you wind up with:
`(7!)/(2!2!) = 1260`` `