Relating moments of self-adjoint polynomials in two orthogonal projections