See where the cable goes? Some sort of screw-thing, right? Hook the SNES or NES up there, whichever one you want to overide the other. (i.e. SNES first-SNES overides NES) Then, hook the other to the screw-thing in that box for the first one. Finally, you hook the cable to the screw-thing in the other system's box that you hooked up.
Mario, Mario, Mario! What happened to Mr. Andretti?