This is the function:

f(x)=(x^2-Bx+4)/(x-A)

given:

x=2 critical point

y=x+5 is an oblique asymptote

I need to find A and B and decide if x=2 is min or max.

i got to f'(x)= (x^2-2Ax-4+BA)/{(x-A)^2}

but I'm not even sure that I need a derivative here.

can someone explain what would be the way to solve this?

Please, if you can, show your work so that I can understand it.

THANKS!