Help needed to make right angled triangle on line!



Help needed to make right angled triangle on line!

Hi, see the following picture ?

P(x,y)
|\
l| \ m
| \
___________________|___\x2,y2
Line-L (x1,y1)| d /
l| / m
| /
|/
P^(x^,y^)


Hi, I need the co-ordinates of P(x,y) and P^(x^,y^) while I know the
following facts:
1. Line - L can be any line passing through two points (x1,y1) and
(x2,y2) where x1,y1,x2 and y2 are known.
2. the Line joining P and P^ is normal to Line - L and the values of
distances l,m,d is known.

cud us please help me ?
Tell me the formula to calculate x,y and x^,y^

Thanks in advance

.