\(A=x^2+2xy+y^2-6-6y-5=\left(x+y\right)^2-6\left(x+y\right)-5=2^2-6\cdot2-5=-13\)
\(B=3\left(x^2+y^2\right)-\left(x^3+y^3\right)+1\)
\(=3x^2+3y^2-\left(x+y\right)\left(x^2+xy+y^2\right)+1\)
\(=3x^2+3y^2-2\left(x^2+xy+y^2\right)+1\)
\(=3x^2+3y^2-2x^2+2xy-2y^2+1=x^2+2xy+y^2+1\\ =\left(x+y\right)^2+1=2^2+1=5\)