You should know that for the function to have an inverse, the function should be bijective. In one of the previous posts, you have found the critical points. From that post you can know the region in which the function is increasing\decreasing. You will observe that in , the function is decreasing, when ,the function is increasing and finally when , the function is decreasing.

This clearly means that a horizontal line will cut the graph at most twice unless we restrict the domain to one of the three regions. Clearly satisfies the given constraint.