A hint to get started
Find point-to-line distance with cross product and projection
The points A,B,P have position vectors , and , respectively. Find the perpendicular distance from P to the line through A and B.
CJC · Lecture · Example 24
Choose a point on the line and a nonzero direction; keep one parameter consistent across all components.