The expression was simplified in the answer to this question. I'm trying to simplify it but I got stuck. Multiplying all the factors and regrouping didn't work, but maybe I'm doing the wrong regrouping.
Also, I don't understand why the $(2p-1)^n$ dropped the exponent in the second line of the same solution.