I'm installing a new sink and as its visible from the picture the pipes are not aligned and sink pipe is not long enough as well. The pipe coming out of the wall is pretty solid so I didn't try pulling it out trying to align the pipes, as well I can bring the sink base a bit closer to the wall, but that will still be not enough to insert the drain pipe. Is there anything i could use as a connection/adapter between these two? Thanks!
While they are not the most correct way to alleviate your problem, check your favorite home center/big box store for a "flexible tail piece extension". The ideal method would be to remove and realign your current drain. While the flexible drains work they are more prone to clogging due to the accordion like walls of the pipe.
They do connect. You have to get the right pieces to make them fit. I would cut out pipe by wall, I would put a trap under drain pipe, you will need to extend the black pipe with female/female and pipe so that the trap exits at same level as your exit by wall, then add a right angle on top of trap, pipe two wall, and fit it together with female/female.