To have a extreme point (Either maximum or minimum or inflection point), the function's first derivative must be zero at the given point. Also to have a maximum at that point, its second derivative must be negative at the given point. Now let's incorporate this in our calculations.
First we will calculate the first derivative.
`f(x) = ax^3+bx^2-5`
`f'(x) = 3ax^2+2bx`
f'(x) is zero at (-1.-4)
`0 = 3a(-1)^2+2b(-1)`
`3a -2b = 0 ` -------- Equation 1
Calculating the second derivative,
`f''(x) = 6ax+2b`
now for a maximum f''(x) must be negative at (-1,4), then,
Also we have been given that the value of f(x) at this local maximum is -4. (since the point is(-1,-4)
Therefore substituting in f(x),
`-4 = a(-1)^3+b(-1)^2-5`
`-a+b = 1` -------------Equation 2
Multiply equation 2 by 3 and add it to equation 1,
`3(-a+b)+3a-2b = 3+0`
`b = 3`
Therefore `-a+3 = 1`
`a = 2`
So we get an answer as a = 2 and b =3. Now this satisfies our requirement for maximum above. (b<3a).
Therefore for values a = 2 and b = 3, f(x) has a maximum at (-1,-4)
`f(x) = 2x^3+3x^2-5`