The green wires can go to earth ground, they can go a metal control panel, your monitor frame, or the cabinet's ground strap.
Or they can be completely ignored, almost no trackballs have them, and the average mame cabinet doesn't have the big earth ground strap setup that most factory arcade games had.