Look for one of my replies to another post on the same subject. The answer is, run a stereo RCA to dual stereo RCA adapter cable (there is a link to one to give you an idea in my other reply). Then run an RCA to RCA cable to the speakers and an RCA to mini-jack cable to the PC. Both your speakers and PC input now receive the same signal.
Both Mac and Windows have standard audio recording tools in the OS, so no need to buy something. You could download audacity (free). It will let you record but also edit your recording after you are done.