After a while, the geometry code gets tedious, but I want to finish this library, so here it goes.
Basically, what is the most efficient way to move one segment of line A so that it no longer intersects with another, B?
Both segments of segments are defined with a starting point (x, y) and a vector describing how the segment passes from this point (eX, eY). The following is an example of how a line segment is described:

The solution I'm looking for is where the line segment moves (its size does not change in any way) to the nearest place where it does not intersect. Example:

What is the most effective way to get this result?
EDIT: , "move" - (x, y) . .
, x/y .