$5x^2−10x+7$ in completed square form? I was studying quadratic equations and practicing to solve them using the technique of completing the squares. 
My answer was as follows: 
$$5x^2−10x=−7$$
$$5x^2−10x+25=18$$
$$x(x-5)^2−5(x-5)=18$$
$$\boldsymbol{(x-5)^2-18=0}$$ 
The answer in the book is: 
$$\boldsymbol{5(x-1)^2+2=0}$$ 
I'm confused. I just started with these sums today. Could you please tell me where I've gone wrong? 

We know that $ax^2+bx+c=0$ and we want to get this form $a(x+d)^2+e=0$.
This is a shortcut: $d=\frac{b}{2a}$ and $e=c-\frac{b^2}{4a}$.
Then we know that $5x^2-10x+7=0$, here we can see that $a=5,b=-10,$ and $c=7$.
So we simply substitute and we get $d=\frac{-10}{2(5)}$ and $e= 7-\frac{(-10)^2}{4(5)}$.
Now we simplify and we get $d=-1$ and $e=7-5 \rightarrow 2$. So our final answer is:
$5(x-1)^2+2=0$.
The other way is by leaving the equation as :
$5x^2-10x+( )=-7$ now factor 5 and we get $5(x^2-2x+( ))=-7$
Then we can use the following information that $(\frac{b}{2})^2$=$(\frac{2}{2})^2=1$
So we get $5(x^2-2x+1-1)=-7$ we take out the -1 since we know that $(x^2-2x+1)=(x-1)^2$
we get $5(x^2-2x+1)-5=-7 \rightarrow 5(x-1)^2+2=0$.
