Please write a code for me about following problem.
Let A(0,1,2) be a point and two lines
d1: x/2 = (y-1)/1 = (z+1)/(-1)
d2: x = 1 + t, y = -1 + 2t, 2 + t.
Find the coordinates of the point M lie on line d1 and the point N lie on line d2 of the line so that the three points A,M, N lie on a straight line. Thank you vety much.