\(B=\left\{-\left(a-2\right)-\left[a-\left(a+1\right)\right]\right\}\\ =-\left(a-2\right)-\left[a-\left(a+1\right)\right]\\ =-a+2-a+\left(a+1\right)\\ =-a+2-a+a+1\\ =3-a\\ a=-2\Rightarrow B=3-a=3-\left(-2\right)=3+2=5\\ a=-2018\Rightarrow B=3-a=3-\left(-2018\right)=3+2018=2021\)