Given that the curve $y=ax^2+b/x$ has a gradient of $-5$ at point $(2,-2)$, what are the values of $a$ and $b$?
I'm not sure how to come at this question, I derived the original equation and I got: $y'=2ax-b/x^2$. I think you need to do simultaneous equations but again I have no idea how to come at this question.
You're on the right track! You've got two unknowns, $a$ and $b$, and two equations: $$\begin{align}y&=ax^2+\frac{b}{x}\\y'&=2ax-\frac{b}{x^2}\end{align}$$
The problem tells you that $x=2$ and $y=-2$, and that at that point, $y'=5$, so you can plug all those values into the above two equations and solve for $a$ and $b$.