Step 1: Understanding the Concept
If \(y\) has extremum values at \(x=-1\) and \(x=2\), then \(\frac{dy}{dx}=0\) at both points.
Step 2: Differentiate
\(\frac{dy}{dx}=\frac{a}{x}+2bx+1\).
Step 3: Form the equations
At \(x=-1\): \(-a-2b+1=0\).\nAt \(x=2\): \(\frac{a}{2}+4b+1=0\).
Step 4: Solve
From the first, \(a=1-2b\). Put in the second: \(\frac{1-2b}{2}+4b+1=0\Rightarrow 3b=-\frac32\Rightarrow b=-\frac12\), so \(a=2\).
Final Answer:
The values are \(a=2\) and \(b=-\frac12\).
\[ \boxed{\text{(B) }\mathrm{a}=2,\ \mathrm{b}=-\dfrac{1}{2}} \]