TeX source:
B=\int_{1}^{3}(1+x)-(3-x) \mathrm{dx}=\int_{1}^{3}(2 x-2) d x=x^{2}-\left.2 x\right|_{1} ^{3}=(9-6)-(1-2)=4