This is an example of completing the square. Notice that when we expand y = (x + a)^2 + b we get y = x^2 + 2ax + a^2 + b. By comparing coefficients (ie, making sure the number x is multiplied by and the constants are the same on both sides), we can see that: 2a = 4, a^2 + b = 6. Solving the simultaneous equations: 2a = 4 -> a = 2, a^2 + b = 6 -> 2^2 + b = 6 -> b = 2, So y = (x + 2)^2 + 2. As the square of a number is never less than 0, the minimum of y is when (x + 2)^2 = 0, ie y = 0 + 2 = 2.