In spite of missing details, I will do my best to explain what I think is going on here. I will edit my answer if more details are given.
The only way I can think that there is no work done when going from rough to smooth and there is work going from smooth to rough is assuming two things (clarify if I am wrong)
1) The rough/smooth patches are flipped between examples. So in the first case the rough patch is at the top, and in the second case the smooth part is at the top
2) The question is actually talking about either "work done by kinetic friction" or "energy dissipated by friction".
If the above are correct, then an explanation becomes pretty evident: In the first case, since the ball starts at rest, static friction will cause the ball to roll without slipping. Because there is no slipping, there is no kinetic friction to dissipate energy. However, in the second case when the ball hits the rough patch it has translational motion without rotating. Therefore, when the ball hits the rough patch it will start rolling while slipping as kinetic friction acts on the ball until it can roll without slipping (assuming the incline is long enough).
So in the first case no energy is dissipated due to friction, but in the second case energy is dissipated by friction.