Option 1: cascaded Y-splitters
You need this:
Amazon Link or google "3.5mm male TRS y splitter"
And this:
Amazon link or google "3.5mm male TRS to stereo RCA female adapter"
Before you buy, CHECK that you are indeed using a 3.5mm TRS jack! You connect the first cable to the line output on your PC. Then one of the arms of the Y goes into your speakers. Connect the second dongle to the second arm of the Y, then connect your sub to it with RCA cable.
Option 2: External or internal sound card
You can use a PCI-E sound card like
these or an external sound card like
these. Make sure you choose one with the outputs that you need.
Neither of these solutions will likely give you great quality. I have recommended something inexpensive and it works.