Convert $ax^2+bx$ to the form $u^2x^2+2uvx+v^2$. Ignore the last term (for now) and let $v=b$. If we start with $u=a$ we can multiply both sides by $a$.

Not quite the form needed. Still missing a $2$ in the second term. We need a number such that $2d=d^2$ which is clearly $d=2$. This gives $u=2a$ which can be achieved by multiplying both sides by $4$

Now add $b^2$ to both sides: