The horizontal line test is used to show if a relation (the more general concept of a function) is one to one. In this case, look at the graph below. The line y = 8 intersects the graph of f(x) at two points. Thus f(x) is not one to one and the function has no inverse. (Here I am presuming the domain of the function is the real line. This point really should be mentioned in the problem.) The problem is what to do with the inverse function acting on the points (-2, 8) and (2, 8). What should the value of $f^{-1}(8)$ be? It can't be both -2 and 2, so this inverse is not well defined. (Basically we are requiring that the inverse of a function also be a function.)