Answer
$a.$ The slope is $m_{tan}=-1$.
$b.$ The equation is $y=-x+2.$
Work Step by Step
$a.$ Using the formula from definition (2) with $a=1$ and $f(a)=1$ (coordinates of the point $P(1,1)$) we have
$$m_{tan}=\lim_{h\to0}\frac{f(1+h)-f(1)}{h}=\lim_{h\to0}\frac{\frac{1}{1+h}-1}{h}=\lim_{h\to0}\frac{\frac{1-(1+h)}{1+h}}{h}=\lim_{h\to0}\frac{-h}{h(1+h)}\lim_{h\to0}\frac{-1}{(1+h)}=\frac{-1}{1+0}=-1.$$
$b.$ Using the formula $y-f(a)=m_{tan}(x-a)$ with the same values for $a$ and $f(a)$ as in part $a$ and the calculated value $m_{tan} = -1$ we get
$$y-1=-1\cdot(x-1)\Rightarrow y-1=-x+1$$ which gives
$$y=-x+2.$$