Make 2d Game Object retract to another Game Object with a condition

Hi. I am making a 2D game that involves shooting a game object to a certain position. There are 2 connected game objects and one of them will be shot to a certain point. I managed to get it shooting correctly but the problem is I want that when the game object reaches that point, the other connected game object will slowly move towards it maintaining a certain distance between them. I don’t know how to go about this…

I think you could use a trigger. Put the trigger in your “certain point” then when the object 1 enters the trigger call the function that will move the object 2. You can find many scripts online on how to move towards a certain point