This question was asked in Misc 18
How to find the length of the foot of the perpendicular

Jeet Chugh's image