As the function f is differentiable at x = 2, so it is contiuous at x = 2 as well.
∴limx→2−f(x)=limx→2+f(x)=f(2)⇒limx→2−x2=limx→2+ax+b=(2)2⇒4=2a+b...(i)Also, f is differentiable at x = 2 ∴Lf′(2)=Rf′(2) i.e.,limx→2−f(x)−f(2)x−2=limx→2+f(x)−f(2)x−2⇒limx→2−x2−4x−2=limx→2+(ax+b)−4x−2 ⇒limx→2−(x+2)=limx→2+(ax+b)−4x−2 [by (i), b=4−2a]∴4=limx→2+(ax+4−2a)−4x−2 ⇒4=limx→2+(x−2)ax−2=limx→2+a⇒a=4Replacing value of a in (i), we get :b=−4