This is deffinetly possible and there are several ways to go about it depending on the end result your looking for, and what you have already.
First off, My solution personally was to buy a reciever from newegg.com that allowed me to plug my computer into it and it would output surround sound, this required a better sound card, specifically with optical output. My recieve had several optical inputs to allow muiltiple devices such as computer, tv, cable, exc, to be feed to the speakers. However, this is the high end solution.
2nd Solution if you already own computer speakers you want to use, would be a hardwear switch where you plug the sound in from each computer on seperate slots, and out to the speakers, switching between source a and b depending on the computer you want to hear. This is basicle the same solution as above but overall a bit cheaper (sound card + quality reciever will run you $300+) This is a device you can probable pick up in any decient audio store or possible even walmart or radio shack if your lucky. Computer speakers typically use the same size jack as earphones. So any 2 source to 1 audio adapter that can do this for headphones should work.
Option 3, if you cant find a spliter like mentioned above, go to radio shack and purchase 3 adapters to go from earphone jack to left and right audio (red and white cords) and a av switch. Make sure you get one that has the female earphone jack for your speakers to plug into, and two that have the male earphone jack to plug into the computers sound output. Not sure if this will work due to sound formats or what quality the sound will be, put its the fastest fix.
Good luck.