$$\text{(a) }\frac1m+\sum_{i=1}^m\left(p_i-\frac1m\right)^{\!2}\\=\frac1m+\sum_{i=1}^m\left(p_i^2-2\frac{p_i}m+\frac1{m^2}\right)\\=\frac1m+\sum_{i=1}^mp_i^2-\sum_{i=1}^m\frac2mp_i+\sum_{i=1}^m\frac1{m^2}\\=\frac1m+\sum_{i=1}^mp_i^2-\frac2m\sum_{i=1}^mp_i+\frac1{m^2}\sum_{i=1}^m1\\=\frac1m+\sum_{i=1}^mp_i^2-\frac2m+\frac1m=\sum_{i=1}^mp_i^2.$$MfG