Show that $$\|A - B\|_{F}^{2} = \sum_{1 \leqslant i,j \leqslant n} p_{i,j}^{2} \left(\lambda_{i}(A) - \lambda_{j}(B)\right)^{2}.$$