connect 2 audio inputs to 1 output using an audiosplitter
You shouldn't connect the outputs directly together, as that might blow something. 

Google DIY passive mixer and/or click this link.

Since you want to drive headphone speakers, you may even want an active mixer, but then it gets slightly more complicated.