\(a.A=-x^2-4x+15=-\left(x^2+4x+4\right)+19=-\left(x+2\right)^2+19\le19\)\(\Rightarrow A_{MAX}=19."="\Leftrightarrow x=-2\)
\(b.B=-x^2-4x-y^2+2y=-x^2-4x-4-y^2+2y-1+5=-\left(x+2\right)^2-\left(y-1\right)^2+5\ge5\)
\(\Rightarrow B_{MAX}=5."="\Leftrightarrow\left\{{}\begin{matrix}x=-2\\y=1\end{matrix}\right.\)