Let f(x) = x3 + ax2 + bx + 6
By factor theorem we get f(2) = 0 [since x-2 = 0 then x= 2]
=> (2)3 + a(2)2 + b(2) + 6 = 0
=>8 + 4a + 2b + 6 = 0
=> 4a + 2b= -14
=> 2(2a + b) = -14
=>2a + b = -7 .............equation (1)
In the second case by remainder theorem we get, f(3) = 3 [since x-3= 0 then x= 3]
=>(3)3 + a(3)2 + b(3) + 6 =3
=> 27 + 9a +3b + 6 = 3
=> 33 + 9a + 3b = 3
=> 9a + 3b = -30
=> 3(3a + b) = -30
=>3a + b = -10 .............equation (2)
b= -7 -2a
Substituting the value of b in equation (2) we get,
3a -7 -2a= -10
=> a-7 = -10
=> a = -3
Substituting the value of a in equation (1) we get, 2(-3) +b = -7
=> -6 + b = -7
=>b = -1
Therefore the respective values of a and b are -3 and -1.