Hello again!

I've been posting a lot of questions recently and I just wanted to let you know that I truly appreciate it! I'm doing some power studying and am forgetting all of these things now that it's summer. Grarrrhh... I got another one for you...

$\displaystyle

f(x) = \begin{cases} x^2 ----- for x \leq 0 \\ ax + b --- for x > 0\end{cases}

$

The functionfabove has an inverse function for which of the following values ofaandb?Answer:a= -1, b = -2

Now, I know how to find the inverse of a function. Basically, you flip the x and y values and then try and put it back into the y= form. But I'm lost about the whole values thing... could somebody explain to me how they arrived at that answer?