Step 1: Where the energy goes.
The block starts at rest at a height of 4 m on a smooth curve, so all its potential energy turns into kinetic energy at the bottom. The curve and the path AB are smooth and take away nothing, so the only thing that can stop the block is friction on the rough part BC.
Step 2: Starting energy.
Take $g = 10\ \text{m s}^{-2}$. The block begins with $mgh = 0.1 \times 10 \times 4 = 4\ \text{J}$.
Step 3: Friction force on BC.
On the rough stretch the friction force is $f = \mu m g = 0.1 \times 0.1 \times 10 = 0.1\ \text{N}$.
Step 4: Total rough length covered.
Friction eats $f$ joule for every metre on BC, and it must use up all 4 J, so \[ d_{rough} = \frac{4}{0.1} = 40\ \text{m}. \] This alone is already more than 40 m, so 29 m can never be correct.
Step 5: Add the smooth metres.
With $AB = 1\ \text{m}$ and $BC = 2\ \text{m}$, each visit to the wall covers 4 m of BC and loses $0.1 \times 4 = 0.4\ \text{J}$. After 10 visits the full 4 J is gone and the block stops right at B. Between visits it slides back to A and returns, adding the first A to B plus nine more round trips, $1 + 9 \times 2 = 19\ \text{m}$ of smooth travel.
Step 6: Conclusion.
Total distance $= 40\ \text{m (rough)} + 19\ \text{m (smooth)} = 59\ \text{m}$. \[ \boxed{59\ \text{m}} \]