#### Answer

$a.$ The derivative is $f'(x)=-\frac{6}{(3x+1)^2}$.
$b.$ The equation is $y=-\frac{3}{2}x-\frac{5}{2}$.

#### Work Step by Step

$a.$ Using the definition of the derivative at $x$ we have
$$f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}=\lim_{h\to0}\frac{\frac{2}{3(x+h)+1}-\frac{2}{3x+1}}{h}=\lim_{h\to0}\frac{\frac{2(3x+1)-2(3x+3h+1)}{(3x+1)(3x+3h+1)}}{h}=\lim_{h\to0}\frac{6x+2-6x-6h-2}{h(3x+1)(3x+3h+1)}=\lim_{h\to0}\frac{-6h}{h(3x+1)(3x+3h+1)}=\lim_{h\to0}\frac{-6}{(3x+1)(3x+3h+1)}=\frac{-6}{(3x+1)(3x+3\cdot0+1)}=-\frac{6}{(3x+1)^2}.$$
$b.$ The equation of the tanget at the point $P(a,f(a))$ is given by $y-f(a)=f'(a)(x-a)$. Using this with $a=-1$, $f(a)=f(-1)=2/(3\cdot(-1)+1)=-1$ and $f'(a)=f'(-1)=-6/(3\cdot(-1)+1)^2=-3/2$ we have
$$y-(-1)=-\frac{3}{2}(x-(-1))\Rightarrow y+1=-\frac{3}{2}x-\frac{3}{2},$$
which gives $$y=-\frac{3}{2}x-\frac{5}{2}.$$