The coefficient of the x-term is -3. Add the square of half of that.
.. (-3/2)² = 9/4 . . . . . . the number you need to add.
x² -3x +9/4 = (x -3/2)²
_____
If the x² term has a coefficient other than 1, you need to factor that out first and deal with the remaining binomial. For example,
.. 2x² -6x = 2(x² -3x)
For this you would need to add 9/4 inside parentheses to get
.. 2(x² -3x +9/4) = 2(x -3/2)²
Of course, to keep the original value, you would need to subtract 2*(9/4) outside parentheses.
.. 2x² -6x = 2(x -3/2)² -9/2