I have 3 point A, B, C in the link. The points generate a triangle ABC.2 red lines parallel to AB and distance between them is 30. the green line passes through B and is perpendicular to AC.
Get vectors
AC = C.x - A.x, C.y- A.y
BA = A.x - B.x, A.y- B.y
and normalize them ((make unit length dividing components by vector magnitude)
Get height vector as perpendicular to AC as
n = -ac.y, ac.x
Find sine of angle between n
and BA
using cross product
s = abs(n.x * ba.y - n.y * ba.x)
Now get coordinates of intersection points:
ip1 = B n * d / s
ip2 = B - n * d / s
That's all.