This would only apply for a simple FE program where the nodes in the model are always labelled from 1 to $n$, every node has the same number of degrees of freedom $f$, and the rows and columns of the global matrix are also ordered in groups of $f$ from 1 to $n$.
First, think about the case where there is only one degree of freedom at each node, or $f = 1$. If the smallest and largest notes in an element are $p$ and $q$, when you assemble element matrix into the global matrix all the terms fit within the square submatrix between rows and columns $p$ and $q$, so the maximum distance of the terms from the diagonal of the global matrix (i.e. the bandwidth) is $q-p+1$ or $D+1$ in your notation.
The bandwidth of the global matrix is therefore the maximum value of $D+1$ for all the elements in the model.
If there are $f$ degrees of freedom at each node, the system matrix is $f$ times bigger, and the bandwidth is also multiplied by $f$ to give your formula.
Note 1, the value of $D$ in each element depends how you number the nodes in the model, and reducing the bandwidth of the global matrix will reduce the computer time required to solve the problem.
Note 2, in modern "real world" FE software this is not very important any more, since different equation solution methods would be used which don't depend on minimizing the bandwidth to make them efficient.