Answer
No, the graphs $f(x) = \frac{(x+2)(x+1)}{x+2}$ and $g(x) = x+1$ are not the same. The graphs are displayed below. $f(x)$ is in red, while $g(x)$ is in blue.
Work Step by Step
First, we can graph the two functions. $g(x)$, being a linear function, is very easy to graph because its a straight line with a slope of one and a y-intercept of (0,1). $f(x)$ is a bit trickier. If you simplify, you would get $f(x) = x+1$, but can we do that? We can, but we have to be careful about the domain. If we plug in $x=-2$ into our original function, it will result in being undefined because you cannot divide by 0. We will have to remove that point from our graph. Other than that, it is pretty much just like the graph of $g(x)$. Therefore, the two graphs are not the same because the the point with x-coordinate of $2$ will appear in one graph but not the other, meaning that there will be a white, unfilled dot somewhere in the $f(x)$ graph.