Answer
$a=-2,b=4$
Work Step by Step
Step 1. Let $f(x)=ax^2+bx$, we have $f'(x)=2ax+b$
Step 2. As the point $(1,2)$ is on the curve, we have $f(1)=a+b=2$
Step 3. For point $(1,2)$ to be an absolute maximum of the function which does not have endpoints, we have $f'(1)=0$, which gives $2a+b=0$
Step 4. Solve the above equations to get $a=-2,b=4$