add one unit of distance from vector3 a to vector3 b

hello all:

so i have object a and object b, and what i want is to take object a position, take object b position and from object a draw a line (imaginary realy, not in unity) to point b and get a point x distance away in that direction.

i made a pic to clarify:

anyway thanks in advance.

Its quite simple really, You just need to take both of the vectors, Get the difference between them, then add that difference to one of them. Eg:

Vector3 PointA = new Vector3(1, 2, 3);
Vector3 PointB = new Vector3(-5, 1, 2);
Vector3 PointC;
void Start () {
    
    PointC = PointA+(PointA-PointB);
    Debug.Log(PointC);
}

This Code Outputs:

(7.0, 3.0, 4.0)

Which if you do the math is correct for these values