This method will only work if your x term is divisible by 2. For example x2 + 6x + 12.
You then use the halved x term (e.g. 3x) to complete the square. The beginning of your factorisation is now (x + 3)2. If we would expand this as it is now we would get the expression x2 +6x + 9. Obviously this isnt quite the term we were asked to factorise we are missing +3 from the final term. This means we then would have to find the difference beween the final term in the original expression and the final term in the expanded expression and add / subtract the difference. So the final expression after factorisation is (x+3) 2 + 3.
We could also use the method if the x2 and x term were both a multiple of one another and then the x term was divisible by 2. An example of this would be 3x2 + 12x + 19. The first two terms are both factors of 3, so if we only consider these for now we can divide these by 3. Leaving us with 3(x2 + 4x). We will then use the same method as previously and divide the x term by 2. Hence... 3(x+2)2 . By expanding (x+2)2 we get x2+ 4x + 4. Multiply this whole thing by 3 leaves us with 3x2 +12x + 12. This is very nearly our initial expression meaning we need to add 3 to get back to this. Hence final expression 3(x+2)2 +3.