I found this website to solve equations and i typed yours in.
First you would subtract the two from both sides and get 3x=9 then divide by 3 on both sides and get x
To determine the constant that makes the expression (x² + kx) a perfect square,
Take the coefficient of the second term which is k and ÷2
In this case, it is (7/2)²
At the end it looks like
x² + 7x + (7/2)² = 27 + 49/4
(x + 7/2)² = 157/4