## Precalculus (10th Edition)

We need for the functions to be equal that also their domains are equal (and other things too). $f(x)$ has $-1$ in its domain but $g(x)$ is undefined for $-1$ (although $g(x)=\frac{x^2-1}{x+1}=\frac{(x-1)(x+1)}{x+1}=x-1$), hence it is not in its domain, thus their domains are not the same, therefore the functions are not equal.