The derivative which you have found correctly will be equal to 0 when x=-2 and x=1 (the turning points). So put -2 in for x to get an equation involving a and b.

Then do the same for x=1 to get another equation involving a and b. Solve simultaneously to find a and b.

Then put these values into f(x) so that all you still need is to find c.

Then use the fact that f(-2)=22 to find c. Check it with the other point (1, -5).