How to create a pipeline geometry as shown below from two vectors?

Create a cylinder that starts from vector 1. Its height should be as much as the vertical difference between vector 2 and vector 1. This is the dashed cylinder in the image. Then modify only the top vertices of the cylinder geometry by shifting them as much as is the horizontal distance between the vectors. @manthrax already showed you how individual verticed can be moved.