Calculate vector A where
A = (x2 - x1,y2 - y1)
A vector perpendicular to this is given by
B = (y1 - y2, x2 - x1)
find the normalised vector
C = B/|B|
where |B|
is simply the modulus of vector B
calculated using pythagoras
Your point (x4,y4)
will then be given as
(x4,y4) = (x3,y3) + K*C
where K is the length of the line (x3,y3)
to (x4,y4)
(which you say in the question that you know). Depending on the orientation of your points, you may need to set the value of K to
K = -K
in order for the point to be correct to your needs.