Cardinality means size and the final answer wasn't multiplied by 2^n.
The second summation is just the sum of integers 0 to x. That would be x*(x+1)/2. Here, x is 2^(n+1)-1, so the sum equals (2^(n+1)-1)*(2^(n+1)-1+1)/2. We drop -1+1 and reorder: (2^(n+1))*(2^(n+1)-1)/2. Now, we divide the first factor by 2 (in order to simplify the /2). Which turns 2^(n+1) to 2^n. The result is (2^n)*(2^(n+1)-1).