I have two endpoints $(x_1, y_1)$ and $(x_2,y_2)$ of a line segment. I want to extend the existing segment by a length of $d$ on just one side of the segment. What are the coordinates of the new endpoint?
So I have $(x_1,y_1)$, $(x_2,y_2)$. I will let the new point have coordinates at $(x_3,y_3)$. I am drawing right triangles with the hope of using similarity in triangles.
Let the slope of the current segment to be $m = \dfrac{y_2-y_1}{x_2-x_1}$ and the current length to be $r= \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$.
How can I proceed? I feel it is confusing.

The third point is going to be a linear combination of the two other points. Consider a scalar parameter $t$ defining
$$ x_3 = (1-t) x_1 + t x_2 \\ y_3 = (1-t) y_1 + t y_2 $$
If you define the distance from point (2)
$$ d^2 = (x_3-x_2)^2 + (y_3-y_2)^2 $$
and use the expressions for $(x_3,y_3)$ you can solve for the parameter $t$
$$ t = 1+ \frac{d}{\ell} $$
where $\ell = \sqrt{ (x_2-x_1)^2+(y_2-y_1)^2 }$ is the segment length
In the end you get $$ x_3 = x_2 + \frac{d}{\ell} (x_2-x_1) \\y_3 = y_2 + \frac{d}{\ell} (y_2-y_1)$$