∵
lim(x->∞)(x^2+1)/(x+1) -ax-b = 0
∴
0=lim(x->∞)[(x^2+1)/(x+1) -ax-b ] / x
=lim(x->∞)[(x+1/x)/(x+1) -a-b/x
=lim(x->∞)[(1+1/x^2)/(1+1/x) -a-b/x
= 1 - a - 0
= 1-a
∴ a = 1
∴
lim(x->∞)(x^2+1)/(x+1) - x - b
=lim(x->∞)(x^2+1 - x^2 - x )/(x+1) - b
=lim(x->∞)(1 - x )/(x+1) - b
=lim(x->∞)(1/x - 1 )/(1+1/x) - b
= -1 - b
= 0
∴ b = -1