Draw x2+6x as tiles: an x-by-x square plus a strip of area 6x. Cut the strip into two pieces, each 3 by x, and attach one to the right side of the square and one to the bottom. The shape is now almost a square of side x+3, missing only a small 3-by-3 corner. Add that corner, 9, and it is complete: x2+6x+9=(x+3)2.
The 9 was not in the original expression, so you cannot just add it. You add 9 and subtract 9 at the same time: x2+6x+2=(x2+6x+9)−9+2=(x+3)2−7. The value is unchanged, but it is now a square plus a constant, which is vertex form: the minimum is −7, at x=−3. The corner is always (2b)2, half the x-coefficient, squared.
When x2 has a coefficient, take it out of the first two terms before building the square. For 2x2+12x+5, write 2(x2+6x)+5, complete the square inside to get 2[(x+3)2−9]+5, then distribute: 2(x+3)2−13. The −9 was inside the bracket, so it becomes −18 when multiplied out.
Factoring also rewrites a quadratic, but as a product of brackets, and it only goes smoothly when the roots are nice numbers. Asked to factor x2+7x+10, find two numbers with product 10 and sum 7: (x+2)(x+5). Completing the square would give (x+27)2−49, which is true but is not a product.
Think of it like this. Completing the square is like finishing a jigsaw that is missing one corner piece: the x2 tile and two strips almost form a square, and (2b)2 is the missing corner. You borrow that piece, so you have to give it back by subtracting it. The tile picture works for positive b; for negative b the algebra is identical, but the drawing has to cut strips away.
Core idea. Completing the square adds and subtracts (2b)2 to turn x2+bx into a perfect square plus a leftover.