Recall that
(a + b)² = a² + 2ab + b²
We want to add a constant to the left side to be able to form a squared binomial. If we let a = x, then
2ab = 10x = 2 • x • 5
so that b = 5, which tells us
(x + 5)² = x² + 10x + 25
So, we add 25 to both sides of the equation to get
x² + 10x + 25 = 9 + 25
and we simplify both sides to end up with
(x + 5)² = 34
If you want to go on to solve for x, we have
x + 5 = ± √34
x = -5 ± √34