Look at the original problem. Its domain is {-1,0,1, 2}, and its range is {-2,3,8,13}. The inverse function of this given function has {-2,3,8,13} as its domain and {-1,0,1, 2} as its range.
Domain of original function becomes Range of the inverse function.