I too would suggest an amplifier. Specifically, a relatively simple, low-output amplifier, probably opamp-based-- the little pocket headphone amplifiers people like so much. Some people call the kind of amplifier I'm thinking of a CMoy, after the name of the guy who put the pocket amp tutorial and schematic on Headwize. You'd spend money (specifically, about $30 for a decent "CMoy", no more than $40-- there are cheaper, worse alternatives, like Radio Shack's Boostaroo or whatever it is, but I don't think you could go below $20), which is always something unfortunate in my book, but it's a relatively elegant and simple solution to your problem.
What to do with it? You could hook it up straight to the motherboard's line-out and connect the speaker amplifier's line-in (probably the cables coming out of the sub meant to hook up to the computer, computer speaker manufacturers like to put all that stuff there) and the headphones to the amplifier's output, or you could hook split the connection to the speakers and amplifier-> headphones. Put more simply:
Motherboard -> Amplifier -> Y-Splitter -> Speaker amp line in, headphones
or
Motherboard -> Y-Splitter -> (Speaker amp line in), (Amplifier -> headphones)
It's up to you what to do. From an audio purity perspective, you should run the signal through as few components as possible as so to ensure minimal signal degradation. Practically, I doubt even a cheapish decent opamp would really make a difference.. driving a power amplifier's line-in is not the most difficult of tasks. However, running the little amp to the headphones only does give you independent volume adjustment for the speakers and headphones (assuming the speakers have some sort of volume control on them).
Oh, if you plan to put it right after the motherboard in the chain (meaning between the motherboard's integrated audio and everything else, speaker amp line-in included), I think it should have common input ground and output ground (no amplification of ground channel) for it to work properly as a pre-amp (which is what it's doing if it goes between source and speaker amplifier). It's only the pricier, fancier headphone amps that aren't this way, so it's probably not a big deal. Of course, if you plan to use it only to drive the headphones, then it doesn't need anything special-- headphone driving is what headphone amplifiers are made to do, after all.
Er, also, I'm definitely not an expert or anything. If you don't mind the idea of buying an amp, you should definitely wait for others' advice.