Given y = 2/(x+3) to find the inverse we swap x and y and solve for our new y which gives:
x = 2/(y+3)
y + 3 = 2/x which means
y = 2/x - 3
Assume that the answer from the book is true. Then swap x and y to get the original function leaves us with:
x = 2(y+1)^(-1)
1/x = 1/2 * (y+1)
1/x = 1/2*y + 1/2
1/x - 1/2 = 1/2*y
y = 2/x - 1 and grouping together gives us:
y = (2-x)/x which is not our original function.
In short: you are right and they are wrong.