I know that $x^2-bx+c=(x-k)^2=x^2-2kx+k^2$ if it is a complete square. If not we create one by adding and subtracting $\left(\frac{b}{2}\right)^2$
I tried $$2\left(x^2-\frac{9}{2}x+\frac{9}{2}\right)=2\left(x^2-\frac{9}{2}x+\left(\frac{9/2}{2}\right)^2-\left(\frac{9/2}{2}\right)^2+\frac{9}{2}\right)$$
What am I missing and what is the best way to factorize when we have coefficients?(Is this the right term, ($a x^2$)?)
Notice that $$x^2-\frac{9}{2}x+\left(\frac{9}{4}\right)^2-\left(\frac{9}{4}\right)^2+\frac{9}{2}=\left(x-\frac{9}{4}\right)^2-\left(\frac{3}{4}\right)^2=\left(x-\frac{9}{4}-\frac{3}{4}\right)\left(x-\frac{9}{4}+\frac{3}{4}\right)$$