Show that the solutions to the equation $ax^2 + 2bx + c =0$ are given by $x = -\frac{b}{a} \pm \sqrt{\frac{b^2-ac}{a^2}}$ 
Show that the solutions to the equation $ax^2 + 2bx + c =0$ are given by $x = -\frac{b}{a} \pm \sqrt{\frac{b^2-ac}{a^2}}$

Hint: Start by dividing the whole equation by $a$
At first I have tried solving the equation without using the hint provided in my exercise and directly applying completing square, I get $x = -\frac{b}{a} \pm \sqrt{\frac{b^2-c}{a}}$. So if I am to use the hint, I obtain the appropriate answer. But I wonder if I am asked the same question in my exam where the hint will not be provided then how am I  supposed to answer.
I would like to know how one should approach this kind of question and how do I realise when to divide the whole equation with in this case $a$ or is there any other ways so that I can avoid dividing the whole equation by $a$.Thanks in advance for any help you are able to provide!
EDIT: Here's my steps. Please see where have I done wrong.
\begin{align}
ax^2+2bx+c&=0 \\
a\left[\left(x+\frac{b}{a}\right)^2-\frac{b^2}{a^2}\right] + c&=0 \\
a\left(x+\frac{b}{a}\right)^2-\frac{b^2}{a} + c&=0 \\
\left(x+\frac{b}{a}\right)^2&=\left(\frac{b^2}{a}-c\right)\left(\frac{1}{a}\right)\\
\left(x+\frac{b}{a}\right)^2&=\frac{a(b^2-c)}{a^2}\\
\left(x+\frac{b}{a}\right)^2&=\frac{b^2-c}{a} \\
x+\frac{b}{a}&=\pm\sqrt{\frac{b^2-c}{a}} \\
\implies x&=-\frac{b}{a}\pm\sqrt{\frac{b^2-c}{a}}\\
\end{align}

As JCAA said, you should assume $a\ne 0$, otherwise, it is not a quadratic equation, but a linear equation. Also, division by zero is undefined. We just could divide both sides by $a$ because of that.
$ax^2+2bx+c=0 \implies x^2+2\dfrac{b}{a}x+\dfrac{a}{c}=0 \implies x^2+2\dfrac{b}{a}x=-\dfrac{c}{a}$
Completing the square,
$x^2+2\dfrac{b}{a}x + \color{red}{\dfrac{b^2}{a^2}} =-\dfrac{c}{a}+ \color{red}{\dfrac{b^2}{a^2}}\\\\  \left(x+\dfrac{b}{a}\right)^2 = \dfrac{b^2-ac}{a^2} \\\boxed{x=-\dfrac{b}{a}\pm \sqrt{\dfrac{b^2-ac}{a^2}}} $
