Let $A$ and $B$ be two idempotent symmetric matrices such that the difference matrix $A-B$ is a positive semidefinite matrix.
The question is to show that
$$AB=BA=B.$$
I first thought that the problem is about simultaneous diagonalization, but I don't know how to proceed.
If $M$ is symmetric and idempotent and $x^TMx=0$, then $Mx=0$. (For this we only need $M$ diagonalizable.) Since $x^TAx-x^TBx\ge0$, we see that if $Ax=0$, then $Bx=0$. Hence $\ker(A)$ is contained in $\ker(B)$.
So $\ker(A)$ is fixed by $B$ and, since $B$ is symmetric, it follows that $\ker(A)^\perp$ is fixed by $B$. Hence the direct sum decomposition $\mathbb{R}^n=\ker(A)\oplus \ker(A)^\perp$ is invariant under both $A$ and $B$.
Now $A$ acts on $\ker(A)^\perp$ as the identity and so, on $\ker(A)^\perp$, we have $BA=AB=B$. As $A$ and $B$ act on $K$ as the zero operator, $BA=AB=B$ on $\ker(A)$.
We conclude that $BA=AB=B$ on $\mathbb{R}^n$.
(It is interesting that it follows from all this that $A-B$ is idempotent.)