I found the answer my teacher gave me:
A(2,0); let B be the point of coordinates \((x,\sqrt{x}) \\\text{With } x \geq 0\)
The formula to calculate the distance between to points M(xM,yM) and N(xN,yN) is \(MN=\sqrt{(x_N-x_M)^2+(y_N-y_M)^2}\)
So \(AB=\sqrt{(x-2)^2+(\sqrt{x}-0)^2} \\AB^2=(x-2)^2+\sqrt{x}^2 \\AB^2=x^2-4x+4+x=x^2-3x+4\)
We end up with a quadratic polynomial (the expression has the form ax2+bx+c, here a=1, b=-3 and c=4). Since a=1>0, the polynomial has a minimum. The formula to calculate the extremum E (minimum or maximum) of a quadratic polynomial ax2+bx+c is \(E=\frac{-b}{2a}\)
So the x coordinate of the minimum M of the polynomial (the x coordinate of B) is \(\frac{3}{2}=1.5\)
And the minimum (y coordinate of B) is \(\sqrt{3/2}\)
So the coordinates of B are \((\frac{3}{2}; \sqrt{3/2})\)
Ah, and I'm silly too, I never found a distance AB of 1.25; here's the result I got:
\(AB=\sqrt{(x_B-x_A)^2+(y_B-y_A)^2} \\AB=\sqrt{(\frac{3}{2}-2)^2+(\sqrt{\frac{3}{2}}-0)^2} \\AB=\sqrt{\frac{1}{4}+\frac{3}{2}}=\sqrt{\frac{7}{4}}\)
So heureka your result for distance seems to be wrong, but I didn't take away some points because I didn't ask for the distance in the question; you gave me the correct coordinates of B, so that's OK.