If your problem only ever entails 2 ‘rail’ curves then loft them into a surface then get the iso line at 0.5 parameter. If your curves are more similar in appearance to say, a road, meaning t-junctions etc are likely, look at computing the medial axis - Youll find a post on the forum explaining it