How to get equation of state from fugacity
That first equation is supposed to be at constant T.  You can rewrite it as $$RTd\ln{(f/P)}=RT(z-1)\frac{dP}{P}$$or $$\ln{\frac{f}{P}}=bT=\int_0^P{(z-1)\frac{dP'}{P'}}$$So if z behaves like z = 1+aPT, this becomes:
$$bT=aPT$$ or b = aP