ĐKXĐ: \(x\ge0\)
\(B=-x-2021+10\sqrt{x}=-\left(x-10\sqrt{x}+25\right)-1996\)
\(=-\left(\sqrt{x}-5\right)^2-1996\le-1996\)
\(maxB=-1996\Leftrightarrow\sqrt{x}=5\Leftrightarrow x=25\left(tm\right)\)
\(B=-x+10\sqrt{x}-25-1996\\ =-\left(\sqrt{x}-5\right)^2-1996\le-1996\\ B_{max}=-1996\Leftrightarrow x=25\)