hi there. i got a situation that i dont know how to handle, pic related.

its all 40mm pvc, the tube on the left is fixed and i cant move it or bend it.
i need to extend it and connect an elbow so i can add a pipe that goes next to the wall on the right.
there are 12,5cm from the fixed pipe to the wall.
the idea is that the new pipe goes right next to the wall.
is it even posible? i dont see a logic way, but as you can imagine im all new to pvc.
my logic of thinking is that if i insert the female-female extensión (which im probably gonna have to cut) + the elbow into the fixed pipe, whatever the ammount of insertion i do, thats the distance its gonna be away from the wall. maybe only 2cm but still. is there anyway around this?