Notice that a(-b/a)+b=0. If we divide f(x) by ax+b then there is some g(x) such that f(x)=g(x)(ax+b)+r(x), where r is the remainder. g(x) has a degree one less than f(x), so if f(x)=h*x^5+.... then g(x)=u*x^4_....

f(x)=g(x)(ax+b)+r

f(-b/a)=g(-b/a)(a(-b/a+b))+r

f(-b/a)=g(-b/a)(0)+r

f(-b/a)=r