The double sum in this case represents a nested sum (if you're familiar with programming, it's like a nested for loop).
In your problem:
means for every iteration of a, we go through all iterations of b. I like to think of it as sort of a series exponentiation.
Formally if we define: and
Will yield different answers. I'm not sure about the actual concepts, I'm not very well versed in physics, but your prof is using the nested case.