Change velocity or speed

I want to change the velocity or speed of an object.
This is my code in Update():

preparing = goal * (distanceTop / (distanceTop + distanceBottom));
//positioning
transform.position = bluePostTop.position + preparing;

You don’t have to care about preparing variable, but the main point here is with transform.position, how do I manipulate its velocity?

This game object follows an object with the calculation above. When the object goes nearer, this game object goes faster.

Have you checked out the tutorials in Unity main page? They are great for learning Unity basics.

You should do something like:

Vector3 velocity;

void Update()
{
  transform.Translate(velocity * Time.deltaTime);
}