This is basic graphics geometry and/or trig, and I feel dumb for asking it, but I can\'t remember how this goes. So:
The answer line is:
y=ax+b
where a=(x1-x2)/(y2-y1)
b=yp-(x1-x2)*xp/(y2-y1)
How the result was obtained:
1) slope for the original line: (y2-y1)/(x2-x1)
2) slope for the answer: -1/((y2-y1)/(x2-x1)) = (x1-x2)/(y2-y1)
3) Plug this into (xp,yp) we can have the result line.
Just calculate the answer from the lines after this (this is too long... I am hungry).