[tex]y=x^5-3\\ y'=5x^4\\\\ 5x^4=0\\ x=0\\ 0\in [-2,1]\\\\ y''=20x^3\\\\
y''(0)=20\cdot0^3=0[/tex]
The value of the second derivative for [tex]x=0[/tex] is neither positive nor negative, so you can't tell whether this point is a minimum or a maximum. You need to check the values of the first derivative around the point.
But the value of [tex]5x^4[/tex] is always positive for [tex]x\in\mathbb{R}\setminus \{0\}[/tex]. That means at [tex]x=0[/tex] there's neither minimum nor maximum.
The maximum must be then at either of the endpoints of the interval [tex][-2,1][/tex].
The function [tex]y[/tex] is increasing in its entire domain, so the maximum value is at the right endpoint of the interval.
[tex]y_{max}=y(1)=1^5-3=-2[/tex]