Another way of doing this question :
We can use this property : \((A-B)^2 = A^2+B^2-2AB\)
\(A = (x−a)^2\) ; \(B = (x−b)^2\)
\((x-a-x+b)^2 = (x−a)^2 + (x−b)^2 -2(x-a)(x-b)\)
==> \((b-a)^2 +2(x-a)(x-b) = (x−a)^2 + (x−b)^2\)
Given b-a = 4 ;
\(16 +2(x-a)(x-b) = (x−a)^2 + (x−b)^2\)
\(16 +2(x-a)(x-a-4) = (x−a)^2 + (x−b)^2\) . Now we need to minimize this expression .So wil try to minimize value for \(2(x-a)(x-a-4)\) to 0 or negative .
\(x = a\) will make this value 0 and this will give 16 ;
\(x=a+2\) will make above expression -ve and will give the value less than 16 hence our answer.
Also, notice that next value of \(x=a+3\) will make \(2(x-a)(x-a-4)\) +ve and hence will make overall value bigger.
Please +1 kudos if this post helps