The entire solution is given to you. Is it the Completing the Square which you don't understand?

$\displaystyle \begin{align*} 3x - x^2 &= -x^2 + 3x \\ &= - \left( x^2 - 3x \right) \\ &= - \left[ x^2 - 3x + \left( -\frac{3}{2} \right) ^2 - \left( - \frac{3}{2} \right) ^2 \right] \\ &= - \left[ \left( x - \frac{3}{2} \right) ^2 - \left( \frac{3}{2} \right) ^2 \right] \\ &= \left( \frac{3}{2} \right) ^2 - \left( x - \frac{3}{2} \right) ^2 \end{align*}$