#### Answer

(a) The slope is $m_{tan}=1$.
(b) The equation is $y=x+4.$

#### Work Step by Step

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