## Calculus (3rd Edition)

$$g'(z)= 2z-1.$$
For the sake of simplicity, we rewrite $g(z)$ as follows $$g(z)=\frac{(z+2)(z-2)}{(z-1)} \, \frac{(z-1)(z+1)}{z+2}\\ =(z-2)(z+1).$$ Using the product rule, the derivative $g'(z)$ is given by $$g'(z)= (z+1)+(z-2)=2z-1.$$