Hi Logan,
I think you are looking for the inverse of f(x) usually written f-1(x) and has the property that f-1(f(x))=x in words f inverse just undoes what f does.
Given that f(x)=(1/x)-2 , the way you solve this is let y=f(x) so y=(1/x)-2 solve this equation for x in terms of y i.e. x=1/(y+2) now let x=f-1(x) and replace y with x and we have
f-1(x)=1/(x+2) now if you do the algebra you will find that f-1(f(x))=x.
Jim