\(B=-x^2-x+5=-\left(x^2+2\cdot\frac{1}{2}\cdot x+\frac{1}{4}-\frac{1}{4}-5\right)=-\left(x+\frac{1}{2}\right)^2+5\frac{1}{4}\le5\frac{1}{4}\)
vậy để b max thì \(-\left(x+\frac{1}{2}\right)^2max\) mà \(-\left(x+\frac{1}{2}\right)^2\le0\)nên suy ra \(-\left(x+\frac{1}{2}\right)^2=0\Rightarrow x+\frac{1}{2}=0\Rightarrow x=-\frac{1}{2}\)