| [beautiful math coming... please be patient]
$ax^2+bx+c$ |  |  | 
| [beautiful math coming... please be patient]
$=(ax^2+bx)+c$ | (group first two terms) |  | 
| [beautiful math coming... please be patient]
$=a(x^2+\frac{b}{a}x)+c$ | (factor $a\ne 0$ out of the first two terms) |  | 
| [beautiful math coming... please be patient]
$=a\bigl(x^2+\frac{b}{a}x+{(\frac{b}{2a})}^2 -{(\frac{b}{2a})}^2\,\bigr)+c$ | (add zero in an appropriate form inside the parentheses; note that $\frac{b}{a}\div 2=\frac{b}{a}\cdot \frac{1}{2} = \frac{b}{2a}$)
 |   | 
| [beautiful math coming... please be patient]
$=a\bigl(x^2+\frac{b}{a}x+{(\frac{b}{2a})}^2\,\bigr)-a{(\frac{b}{2a})}^2 + c$ | (distributive law) |  | 
| [beautiful math coming... please be patient]
$=a{(x +\frac{b}{2a})}^2 + \text{stuff}$ | (rename as a perfect square) |  |