Hint...
The range is restricted. Hence the polynomial can't be an odd degree polynomial. So make the coefficients of $x$ having odd powers equal to $0$ to find value of p.
Note - Don't make coefficient of $x$ as $0$ . Just set coefficients of $x^5$ and $x^3$ equal to zero, so that the polynomial immediately becomes even degreed.
Now you know the maximum value of quadratic so obtained. Hence find the maximum value in terms of $q$ and set it equal to $-1$ to get possible values of $q$