You don't need derivatives to solve this problem; it is known from high school that a quadratic polynomial $q(x)=ax^2+bx+1$ has an extremum at $\xi=-\frac b{2a}$, which is a minimum if $a>0$, a maximum if $a<0$, and that this extremum is equal to
$$q(\xi)=\frac{4ac-b^2}{4a}=-\frac{\Delta(q)}{4a}.$$
To determine the coefficients of $q(x)$, you simply have to solve the system of equations:
$$\begin{cases}\begin{aligned}
q(-2)&=\phantom{2}4a-2b+c=41 \\
q(5)&= 25a+5b+c=20 \\
-\frac b{2a}&= 2
\end{aligned}\end{cases}
\implies
\begin{cases}\begin{aligned}
21a+7b &=20 \\
b&= -4a
\end{aligned}\end{cases}
$$
Can you end the calculations?
Added: To answer the question of why the derivative is $0$ at a vertex $S(x_0,f(x_0))$ on the curve, suppose $S$ corresponds, say, to a local minimum. The intuitive explanation is that the slope of a chord $(SM)$ is negative is $M$ is before $M(x,f(x))$, i.e. since $x<x_0$ and $f(x)>f(x_0)$ the rate of variation is negative. Passing to the limit on left, we obtain that $f'(x_0)\le 0$.
On the other hand, if $M$ is *after $s$, we have $x>x_0$ and still $f(x)>f(x_0)$, so the rate of variation is positive, and wwe can conclude <ith the same argument that $f'(x_0)\ge 0$.
Therefore we have both $f'(x_0)\le 0$ and $f'(x_0)\ge 0$. Conclusion?
Note: This is only a necessary condition to have a local extremum, certainly not a sufficient condition.