Here's a good clear explanation from Jack of Madras College.

Consider the movement of the block relative to the logs:

When the log makes one revolution it travels

πd metres. As the block is in contact with the logs, it moves πd metres along the horizontal plane.

Therefore, the block moves

πd metres relative to the logs.

Now consider the movement of the logs relative to the ground:

When the log makes one revolution it rotates

πd metres. As it is in contact with the ground it moves πd metres along the horizontal plane.

Therefore, the log moves

πd metres relative to the ground.

This means the log moves

πd metres relative to the ground but the block moves πd metres relative to the logs. Therefore, the block moves 2πd metres relative to the ground, which is twice as much as the logs. Thus:-
the block moves twice as fast as the logs.