Given is the function: f(x)= (x^2-4x) / (x^2+2)

Asked:

For which p ( element R ) contains the set of solutions of the equation f (x) = p exactly one element ?

To give the found p the set of solutions.

How do I solve this taskcorrectly? Look, I can fill in for p, p=-1 , p=1 and p=2 .

So I find the answers= p=-1 with x=1

p=1 with with x=1/2

p=2 with x=-2

But is this the right way? I filled these values for p , because I saw this in the answer book.

If I did not have the answer book, how do I know which values of p should I choose?