To solve this problem, we need to apply the concept of the coefficient of restitution and energy conservation.
Step 1: Understanding the Coefficient of Restitution
The coefficient of restitution \( e \) is the ratio of the relative speed after collision to the relative speed before collision:
\[
e = \frac{\text{velocity after collision}}{\text{velocity before collision}}
\]
For a ball falling on the floor, each time the ball hits the floor, its velocity decreases by a factor of \( e \) (since the velocity after collision is \( e \) times the velocity before collision).
Step 2: Distance Covered in Each Drop
When the ball falls from height \( h \), it hits the floor and bounces back. The distance covered in the first fall is \( h \). After the first bounce, the ball reaches a height \( e^2 h \) because its velocity after the bounce is reduced by a factor of \( e \), and the height is proportional to the square of the velocity.
Thus, after the first bounce, the ball falls from height \( e^2 h \), then bounces back to \( e^4 h \), and so on. Each successive fall and bounce will cover a smaller and smaller distance.
Step 3: Total Distance Covered
The total distance covered by the ball is the sum of all the drops and bounces. This can be expressed as a series:
\[
\text{Total Distance} = h + 2(e^2 h + e^4 h + e^6 h + \dots)
\]
This is a geometric series with the first term \( e^2 h \) and common ratio \( e^2 \).
Using the formula for the sum of an infinite geometric series \( S = \frac{a}{1 - r} \), where \( a \) is the first term and \( r \) is the common ratio, the total distance covered is:
\[
\text{Total Distance} = h + 2 \cdot \frac{e^2 h}{1 - e^2}
\]
Simplifying the expression:
\[
\text{Total Distance} = h + \frac{2e^2 h}{1 - e^2} = \frac{h(1 + e^2)}{1 - e^2}
\]
Thus, the correct total distance covered by the ball before it comes to rest is:
\[
\boxed{\frac{1 + e^2}{1 - e^2} h}
\]
Step 4: Conclusion
The correct answer is:
\[
\boxed{(B)}
\]