GH Snap Control Points to Nearest Curve

Hi everyone. I am helping a friend and cannot figure out in grasshopper how to snap some curves endpoints to the nearest curve that is not the curve itself.

If I use the pull point I will get the point itself since the closest curve is the curve used to generate the control points. I tried with MCX but does not work all of the time. Can someone help me without using fancy plugins but just the standard commands of GH?

Thanks a lot to everyone!

curve_snap.gh (17.0 KB)
here is a c# code used ai to create it for me u can try it out

Curve Closest Point,

Or Extend curve + find Line | Line Crossing.

Depending on what you need.