proving the identity $b^3 = 6\binom{b}{3} + 6\binom{b}{2} + b$ for $b \in \mathbb{N}$, $b > 2$, by counting a set in different ways

$$b^3 = 6\binom{b}{3} + 6\binom{b}{2} + b$$

Method 1: We count ordered triples with entries drawn from the set $\{1, 2, 3, \ldots, b\}$ with replacement in two ways.

There are $b$ choices for each of the three entries, so there are $b^3$ such triples.

For the RHS, we consider cases, depending on how many different numbers appear in the triple.

Three different numbers appear in the triple: There are $\binom{b}{3}$ ways to select three different numbers to appear in the triple, and $3!$ ways to arrange them within the triple. There are $$\binom{b}{3}3! = 6\binom{6}{3}$$ such triples.

Exactly two different numbers appear in the triple: There are $\binom{b}{2}$ ways to select two different numbers to appear in the triple, two ways to choose which of those selected numbers will appear twice, and three ways to choose which of the three entries in the triple will be filled by the singleton. Hence, there are $$\binom{b}{2} \cdot 2 \cdot 3 = 6\binom{b}{2}$$ such triples.

Exactly one number appears in the triple: As you observed, there are $b$ ways to fill each entry in the triple with the same number.

Hence, the number of ordered triples with entries drawn from the set $\{1, 2, 3, \ldots, b\}$ with replacement is $$6\binom{b}{3} + 6\binom{b}{2} + b$$ Since we have counted the same set of triples in two different ways, the counts must be the same. Hence, $$b^3 = 6\binom{b}{3} + 6\binom{b}{2} + b$$

Method 2: We distribute three different prizes to $b$ people, where each person may receive up to three prizes.

There are $b$ ways to select the recipient of each of the three prizes, so the prizes can be distributed in $b^3$ ways.

For the RHS, we consider cases, depending on how many different recipients receive the prizes.

Three different recipients of the prizes: There are $\binom{b}{3}$ ways to select three recipients for the prizes and $3!$ ways to distribute the prizes among them, giving $$\binom{b}{3}3! = 6\binom{b}{3}$$ such distributions.

Two different recipients of the prizes: For this to occur, one person must receive two prizes and a different person must receive the other prize. There are $\binom{b}{2}$ ways to select two recipients for the prizes, two ways to choose which of them receives two prizes, and $\binom{3}{2}$ ways to decide which two of the three prizes that person receives. The other person must receive the remaining prize, so there are $$\binom{b}{2}\binom{2}{1}\binom{3}{2} = \binom{b}{2} \cdot 2 \cdot 3 = 6\binom{b}{2}$$ such distributions.

One recipient receives all three prizes: There are $b$ ways to select which person receives all three prizes.

Since the three cases are mutually exclusive and exhaustive, the prizes can be distributed in $$6\binom{b}{3} + 6\binom{b}{2} + b$$ ways.

Since we have counted the same set of prize distributions in two different ways, our counts must be equal. Hence, $$b^3 = 6\binom{b}{3} + 6\binom{b}{2} + b$$


Slight different approach (Case 2 below)!

Consider $b=3$ for simplicity.

There are $b^3=27$ ways to form a $3$-digit number with the digits $1,2,3$.

Case 1: All three digits are the same: $${b\choose 1}={3\choose 1}=3 \Rightarrow 111,222,333.$$

Case 2: Two digits are the same: $${3\choose 2} \Rightarrow \color{red}{**\times},\color{green}{*\times*},\color{blue}{\times**} \quad \text{(* - same, $\times$ - different)}\\ {3\choose 2}{b\choose 1}={3\choose 2}{3\choose 1} \Rightarrow \color{red}{11\times,22\times,33\times},\color{green}{1\times1,2\times2,3\times3},\color{blue}{\times11,\times22,\times33}\\ {3\choose 2}{b\choose 1}{b-1\choose 1}={3\choose 2}{3\choose 1}{2\choose 1} \Rightarrow \color{red}{112,113,221,223,331,332},\color{green}{\cdots},\color{blue}{\cdots}.$$

Case 3: All three digits are different: $${b\choose 3}\cdot 3!={3\choose 3}\cdot 3! \Rightarrow 123,132,213,231,312,321.$$ Hence: $$\begin{align}b^3&={b\choose 3}\cdot 3!+{3\choose 2}{b\choose 1}{b-1\choose 1}+{b\choose 1}=\\ &=6\cdot {b\choose 3}+{3\choose 2}{b\choose 2}{2\choose 1}+{b\choose 1}=\\ &=6\cdot {b\choose 3}+6\cdot {b\choose 2}+b.\end{align}$$