On dividing, f(x) by (x-1) we get remainder =b-a-4
And ,we are given the remainder is 5
So, b-a-4=5
And, On dividing f(x) by (x+1) we get remainder=b+a
So, b+a=19
As, b-a-4=5 And b+a=19
To solve for a and b let us add the two equations
So, 2b+0a-4=5+19
Or. 2b-4=24
Adding 4 on both sides we get
2b-4+4=24+4
2b=28
Divide by 2 on both sides
2b/2=28/2
b=14
As, a+b=19 and b=14
So, a+14=19
Subtracting 14 from both sides, we get
a+14-14=19-14
a+0=5
a=5
So, a=5 and b=14