what you're looking for is a "zero" crossing of the interpolated line between points after you've shifted it by -4. if your data had many more data points between zero crossings you could do a polyline fit and use the matlab/octave tools to find zeros of a polyline. Here, you may just want to make a loop that generates the equation of a line between successive points, does a (shifted) zero-find with that line, and then has some clean up functions to account for points that hit y=0 exactly (hence both segments will report the same zero location giving you duplicate points), or don't hit it at all. It would then be simple to loop this through all of your collected points.
As your comments indicated that 'always crossing 4' was arbitrary, and wouldn't always even cross at a fixed value, the script below will take care of the situation your provided in the your question, as well as the case where they randomly cross. it takes the two curves, subtracts them, and finds where that equals zero. it then returns the intersection frequencies and the amplitudes at those points.
note that the code below could be vectorized to run much faster without a for loop, but i think the for loop is more instructive at this point. what I'm doing is really repeated linear interpolation, and there are built in functions to do that for an array of points. I believe even the direct method here could likely be vectorized as well. But this appears sufficient for your purpose.
#amp_orig1 = floor(10*rand(1,7))
#amp_orig2 = floor(10*rand(1,7))
amp_orig1 = [8 8 9 0 5 1 2]
amp_orig2 = [8 8 4 2 4 5 6]
numpoints = numel(freq);
crossings_xvals = NaN(numpoints-1,2); #ones with no crossing will stay as NaN
crossings_yvals = NaN(numpoints-1,2);
#crossing_amp_value = 4; #selected since your inversion is about amp=4.
amp_shift = amp_orig1-amp_orig2; #solve for zero crossing in rest of code
#first find the zero crossing for each segment
for fval = 1 : numpoints-1
xs = freq(fval:fval+1);
ys = amp_shift(fval:fval+1);
slope = (ys(2)-ys(1))/(xs(2)-xs(1));
yintercept = ys(1) - slope*xs(1);
xintercept = -yintercept/slope;
#exclude cases where it doesn't intersect in that segment
if (xintercept>=xs(1) && xintercept<=xs(2))
#get actual y-value at crossing
ys_orig = amp_orig1(fval:fval+1);
yval_at_crossing= ((ys_orig(2)-ys_orig(1))/(xs(2)-xs(1)))*(xintercept-xs(1)) + ys_orig(1);
crossings_xvals(fval) = xintercept;
crossings_yvals(fval) = yval_at_crossing;
#drop NaNs to account for it not always oscillating/crossing amp=4;
crossings_xvals = crossings_xvals(~isnan(crossings_xvals));
crossings_yvals = crossings_yvals(~isnan(crossings_yvals));
#remove duplicates. floating point arithmetic, so check if they're closer than
#numerical error eps
dups = find(diff(crossings_xvals)<=eps);
#final xvalues where it crosses/equals '4'
crossings = [crossings_xvals,crossings_yvals]
if they're sampled at different frequency values, you'll have to do a lot more interpolating freq values before calculating the rest.