Finding sum of the roots of $4(x-\sqrt x)^2-7x+7\sqrt x=2$ 
Find sum of the roots of $$4(x-\sqrt x)^2-7x+7\sqrt x=2$$

By substituting $t=x-\sqrt x$ we have $4t^2-7t-2=0$
$$4t^2-8t+t-2=0$$
$$(4t+1)(t-2)=0$$
So we get $x-\sqrt x=2$ Hence $x=4$.
Or $x-\sqrt x=-\frac14$ then $x-\sqrt x+\frac14=0$ and $(\sqrt x-\frac12)^2=0$ and $x=\frac14$
So sum of the roots is $4+\frac14=\frac{17}{4}\quad$ Or $\quad 4+\frac14+\frac14=\frac92$ (adding $\frac14$ twice)?

We are asked to find the sum of roots of this function:

$$4(x-\sqrt{x})^2-7x+7\sqrt{x}=2 \Leftrightarrow \\ 4(x-\sqrt{x})^2-7x+7\sqrt{x}-2=0$$

$\text{As you are saying by substituting } t=x-\sqrt{x}  \text{ (1)}\text{ ,we have:}$
$$4t^2-7t-2=0 \Leftrightarrow (4t+1)\cdot(t-2)=0$$
$\text{And the solution we get from the previous equation are:}$
$$\boxed{t=-\frac 1 4 \text{ or } t=2 \text{ (2)}}$$
$\text{And now by replacing the varialbe } t \text{ we have that:} $
$$x-\sqrt{x}=-\frac 1 4 \text{ (3)  or }x-\sqrt{x}=2 \text{ (4)}$$
$\text{Let } u=\sqrt{x} \Rightarrow u^2=x ,u \ge 0 $
$\text{We demand } u\ge 0 \text{ because the function:} f(x)=\sqrt{x} \text{ with a domain: }$ $D=[0,+\infty) \text{ it has a range: } R_f=[0,+\infty)$
$\text{For the equation (3) we have:}$
$$u^2-u-2=0 \Rightarrow u_{1}=2 \text{ or } u_2=-1$$
$\text{The second root we found we have to reject it because we demand } u\ge0 $
$\text{So we can accept only } u_1=2$
$\text{For the equation (4) we have:}$
$$u^2-u+\frac 1 4=0, \Delta=0  \Rightarrow u_3=\frac {b \pm \sqrt{\Delta}} a= \frac 1 2 $$
$\text{Now by replacing the variable u we have that the roots are:}$
$$\boxed{x_1=4 \text{ or } x_2=\frac 1 4}$$
$\text{And now when it comes to the sum of roots we have:}$
$$\boxed{S=x_1+x_2=4+\frac 1 4=\frac {17} {4}}$$
As you can see i didn't add twice the number $\displaystyle\frac 1 4$.It may be called "doulbe root" but as you can see above the quadratic formula give us one solution when $\Delta=0$
