I found a weird solution to the problem, I used a 3.5mm stereo headphone splitter and it worked. It was something like this https://www.amazon.in/Dealsplant-Headphone-Earphone-Splitter-Adapter/dp/B078KBLS5T/
I don't know much about headphones, but I think the three black lines in our headphones...