I think the problem is that you're trying to (if I understood correctly) to use the splitter in 'reverse'. You´re connecting two sources of music/audio (phone and piano output) into a single 'sink' (the headphones, or input). Those cables are mostly meant to do the opposite: Have one output split to two audio inputs, like two different headphones.
Now, while technically possible to connect two audio sources into a single audio sink since it's all electrical currents and they will flow anywhere there's a connection (you can connect old microphones into a headphone jack and hear the music through the mic, for instance), devices these days are protected and impedance-controlled. When using splitters, the signal loses power because of the split, but also the resistance that the devices 'sense' changes, and that might trigger a device to 'close up' or not to work properly (most of the time, you get noise and feedback from strong radio signals).
If you really want to do that, you're missing an 'ingredient' in your audio recipe: A mixer. That would allow the signal from the piano and the signal from the phone to be fused together and then output as a single signal into the headphones.