A simple audio cable with 3,5 mm headphone jack on both ends is sufficient (to the Macs line-in).
The bigger problem is, you need a software to “live pass-through“ the sound from the line-in to any connected speakers.
If it‘s a simple mp3 player that is detected like a flash drive via USB, you could access it from the Mac and directly play the songs with your favorite macOS music player - but I understand you want the playback to happen directly on the device itself.