\(B=cos^273^0+cos^287^0+cos^23^0+cos^217^0\)
\(\Rightarrow B=cos^273^0+cos^287^0+cos^2\left(90^0-87^0\right)+cos^2\left(90^0-73^0\right)\)
\(\Rightarrow B=cos^273^0+cos^287^0+sin^287^0+sin^273^0\)
\(\Rightarrow B=\left(cos^273^0+sin^273^0\right)+\left(cos^287^0+sin^287^0\right)\)
\(\Rightarrow B=1+1=2\)