You tagged your question as 3D, but you are showing 2D examples. I know it's for illustration, but in 3D you are missing the Y coordinate, which determines where is up and down. If you don't mind, then your problem is 2D only using X and Z.
You can ignore the direction of both points, however if you do that you'll have a problem, because you need to figure out where to go, and continue going the same way over time. Left? Right? Only the direction of at least one of the points can fix that.
In 2D, finding the position of the red cross can be done this way:
# Assuming A and B are 2D coordinates
# Get direction from A to B
var direction = (B - A).normalized()
# Rotate 90 degrees... left or right?
# To decide that, make the angle positive or negative.
var lateral_direction = direction.rotated(PI/2.0)
# Calculate red cross position
var cross_pos = B + lateral_direction * some_distance
Transposing that in 3D depends on how you want it to behave with a third dimension, I would say that the up vector (Y) will come into play then, because the ground might not be flat.