Take a look at the table script I put into a data table I made up for this problem.
You probably don't need the interactivity but it should give you an idea for solving the intercept based on a critical point selection.
The main solution in in the graph script:
selected_rows = Current Data Table() << Get Selected Rows();
If( N Items( selected_rows ) > 0,
Current Data Table() << Clear Row States();
critical_row = selected_rows[1, 0][1];
Current Data Table() << Select Rows( critical_row );
Current Data Table() << Colors( "Red" );
Current Data Table() << Clear Select();
);
Try(
x_prev = :X[critical_row - 1];
x_crit = :X[critical_row];
y_prev = :Y[critical_row - 1];
y_crit = :Y[critical_row];
slope = (y_crit - y_prev) / (x_crit - x_prev);
x_intercept = x_crit - y_crit / slope;
Y Function( slope * (a - x_intercept), a );
Marker( Marker State( 2 ), {x_intercept, 0} );
Text( {x_intercept, 0}, Eval Insert( " intercept = ^x_intercept^" ) );
);
What we see of the real world is not the unvarnished real world but a model of the real world, constructed so it is useful for dealing with the real world. —Richard Dawkins