Consider {x1,y1} to {x2,y2} to be a vector, “vector1”. Now make another vector, “vector2”, with point {x3,y3} and another point which is one unit away from {x3,y3} at an angle that’s perpendicular to vector1: e.g., if vector1 is at angle ‘p’, your want to make the second point in vector2 {x3+cos(p+90º),y3+sin(p+90º)}.
Now you have these two vectors, you just need to figure out where they cross. You can google this: here’s one page I found.