Just expand A(x+B)^2 + C, giving A.x^2 + A.2Bx + A.B^2 + C and equate this to 2x^2+8x+2. Looking at the x^2 term we have A = 2. Looking at the x term we have 2AB = 8. Looking at the constant term we have AB^2+C = 2. Taking the equations in this order gives you the values of A, then B, then C.