The book states that $\sup_{x \in D} f(x) = \sup_{-1\le x \le5}(x^2 - 9x +1 ) = 11$
And $\inf_{x \in D} f(x) = \inf_{-1\le x \le5}(x^2 - 9x +1 ) = \frac{-77}{4}$
my question is that why $\sup f(x) = 11$ and $\inf f(x) = \frac {-77}{4}$
Hint. Note that $$f(x)=x^2-9x+1=\left(x-\frac{9}{2}\right)^2-\frac{81}{4}+1=\left(x-\frac{9}{2}\right)^2-\frac{77}{4}.$$ This implies that $f$ is decreasing in $[-1,9/2]$an it is increasing in $[9/2,5]$.
Can you take it from here?