The following assumes that the speakers connect to the computer via the normal 3.5mm stereo mini jack (like a headphone jack):
Ideally, you’d want a splitter (you just want two right?) or switchbox that can handle 3.5mm stereo mini jacks. In that case, you’d buy a pair of long male/male stereo mini wires (to plug into the computers) and plug them into the box/splitter and the speakers on the other end.
If you can only get the RCA switchbox, you need a pair of long male stereo mini to male RCA stereo Y cables (from the computers to the switchboxes) and a female stereo mini to male RCA stereo Y adaptor (to plug the speakers into the switchbox).