I've already read two threads on this but the instructions given are not clear enough for me.
i would like to attach the ends of the highlighted mesh, so that animating this part isnt so tedious.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
What you can do is create a long plane, subdivide it, create a group, give it a Physics > Cloth with the group as Pin Group:
Create your 2 objects, 2 cubes here (but it can be empties or bones), select a cube, shift select the plane, switch to Edit mode, select the same vertices as the pin group, press CtrlH > Hook to Selected Object. You can hook to a vertex group of the object if needed. Do the same for the other cube. Put the Cloth modifier under the Hook modifiers:
Create your pipe object, hook it as well, give it a Surface Deform with the plane as Target, click on Bind. The Surface Deform modifier must be under the Hook modifiers:
Make the plane invisible, move the cubes: