Since (x−2)2≥0, the sign of f′ is controlled by (x+3)(x+1): positive on (−4,−3), negative on (−3,−1), positive on (−1,4) (passing through x=2, where f′ touches zero without changing sign).
So f has a local maximum at x=−3 and a local minimum at x=−1; comparing these with the endpoints gives the global extrema on [−4,4].