More specific data is required: a point in the centerline of the Pipe1 with a vector of the centerline of Pipe2, and point in the centerline of the Pipe2 with a vector of the centerline of Pipe2.
If appears that either pipe may be cut at any point. If you specific an exact terminal point for either pipe, then the solution has a restricted value.
If you supply the coordinates (x,y,z) for the end of the pipe that is not be be cut and a vector for that pipe,
and you supply coordinates for a point in the centerline of the pipe is is allow to be cut and also give a vector for the centerline,
then a solution can be given.
In the placement of pipes in a treatment plant, these types of problems are routinely solved.
Can you supply additional information?