This is a homework question for an online class.. infinity or -infinity does not work for A or B
And it certainly shouldn't! You were told to use the forms
"(-infinity,A) , (A,B) , and (B, Infinity) where A>B"
Which of the two numbers you got is larger?