given the functions:

f(x) = x^2 - 1, g(x) = x/x + 2

Why is x^2 - 1/x^2 + 1 the equation of (g o f)(x)?

assume you forgot parentheses

g(x) = x /(x+2)
g = (x^2-1)/(x^2-1+2)
= (x^2-1)/(x^2+1)