Is there any way to extend a curve while maintain the 1st derivative at the end and the 2d derivative the entire line?

In the attached I have a yellow line that I would like to extend. I would like it to reach the black line but I do not care where the intersection is. I would like to keep a smooth curve going. Thus, I would like to maintain the 1st derivative at what is now the end point but I would like the 2d derivative to be the same all the way to the intersection.