Simultaneous solutions of Sylvester equations and idempotent matrices separating the joint spectrum