Imagine you have a string in the Cartesian plane that is mostly above the x-axis, but some of it is below. Now imagine this string moves in such a way that all of it is above the x-axis. Now think about what has to happen at the moment it goes from being partly below to being completely above. At that moment, it has to be tangent to the x-axis. That is, it has to have a point with y-value of zero (because it's right on the edge between being below the x-axis and not), and the slope has to be zero there (if, for instance, the slope were positive, then that would mean that there's a little bit to the left that's below, so you could still move it a little more while keeping some of it below the x-axis).
So you're looking for a point where both y and y' are zero. First, set y' to zero.
y'= m-1/x2 = 0
x = $\frac{1}{\sqrt{m}}$
Next, set y to zero
y = mx -1 + 1/x = $\sqrt{m} -1 + \sqrt{m} $ = 0
So
$2 \sqrt{m} = 1$
$\sqrt{m} = \frac{1}{2}$
$m = \frac{1}{4}$
Another way to think of it:
Imagine that the string intersects the x-axis at r1 and r2. As less and less of the string is below the x-axis, r1 and r2 should get closer and closer together. You're looking for the moment where they are the same.
You have
y = mx -1 + 1/x
y = (mx2 - x +1)/x
Setting this to zero, you have
(mx2 - x +1)/x = 0
mx2 - x +1 = 0
You now want the discriminant in the quadratic formula to be zero so that the two roots will be the same.
b2-4ac = 0
1-4m = 0
m = 1/4