g(x)=x+1x+2,x≠2
Let y = x, then g(y)=y+1y+2
Let x = g(y), so that x=y+1y+2
x(y+2)=y+1
xy+2x=y+1impliesxy−y=1−2x
y(x−1)=1−2ximpliesy=1−2xx−1
y=g−1(x)=1−2xx−1
g−1(2)=1−2(2)2−1=−3