I'm installing a new vanity, everything fits fine except the sink drain is about two inches farther out from the wall than the previous sink was. How can I get some horizontal extension? The outtake pipes are all glued, nothing to unscrew there. I tried a flexible p-trap fitting but it's going from a 1 1/4 inch sink tailpipe to a 2 inch outtake pipe.
The usual fix for this would be to extend the part of the pipe from the wall at the back of the cabinet out the amount needed to match up for the new sink drain location. In some instances there is a larger diameter pipe in the wall that the rear piece slides into and is secured with a compression washer and a clamp nut. The horizontal slide joint makes it much easier to adjust the P-trap joint.
In your situation due to the glued connections at the wall it can be more work to resolve this issue. Especially since it does not appear that there is much allowance to just cut and glue in new fittings. You will likely need to cut off the existing P-trap elbow from the rear wall extension. There is a small space just behind the elbow where this cut can be made. What you would be cutting there is a short piece of the pipe that is about 2 1/4 inches long that was glued in to join the P-trap elbow and the next fitting that extends out of the wall.
Once the elbow is cut off the next step is to hopefully be able to remove the remaining stub of pipe that is glued into the fitting from the wall. There are specialty rotary cutter tools that are made for carving out pipe stubs in existing fittings so that a new pipe extension can be glued in its place. This is one example of such a tool that is powered by an heavy duty electric drill (often one sized as a 1/2" drill).
The other ugly alternative that you have in a situation like this is to cut into the drywall to open up the wall enough so that you can access the drain pipe where it is possible to cut where you can then use a coupler fitting and new pipe and fittings that are measured out to meet the new sink location. Subsequent repair of the drywall makes a much larger project of the repair such that the cost of trying the tool shown above is a very tidy alternative.
I would extend the outlet pipe from the wall, depending on the supplier you can get the joints with rubber seals which make adjustment easier.
Then either shorten the drop from the sink or extend the outlet vertical.