The distance between two the two points is:
Note that if we square the distance:
we still find the minimum x in the same place with a much easier computation.
So now take your x derivative with respect to the equation, set it equal to 0, etc.
Not sure why you've got the part, though.
Edit: Ahhhh, because the domain of the function is only positive x.