B2 has 10 electrons.
(σ1s)2,(σ∗1s)2,(σ2s)2,(σ∗2s)2,(π)2
So, Bond Order=12(a−b)
Here, a is the number of electrons in bonding molecular orbitals and b is the number of electrons in antibondng molecular orbitals.
Bond Order=12(6−4)=1 (single bond)
Number of pi bonds in B2 is 0
Therefore, sum is 1+0=1