Rotate curve around a point until it is tangential to another curve

Hi All,
I am trying to rotate a curve around a point until it is tangental to another curve. Sounds straight forward, but it seems to be very difficult to do in Dynamo. See diagram below, red point is the rotation point and the green lines outline the final result.
Thanks, Gerard