First, for each i=1,2,…,2p−1,
p2i(2ip)=(2i−1)!(p−1)(p−2)⋯(p−(2i−1))≡(2i−1)!(−1)(−2)⋯(−(2i−1))≡−1(modp).
Hence
i=1∑(p−1)/2ip−2≡−i=1∑(p−1)/2ip−2p2i(2ip)≡−p2i=1∑(p−1)/2ip−1(2ip)≡−p2i=1∑(p−1)/2(2ip)(modp)(by Fermat’s Little Theorem.)
The last summation counts the even-sized nonempty subsets of a p-element set, of which there are 2p−1−1.