To make everything easier, it's best to turn the mixed numbers into improper fractions.
24 * 8 = 192 + 3/8 = 195/8
4 * 8 = 32 + 7/8 = 39/8
The question asks how many 39/8-inch long pieces the worker cut from a 195/8-inch long board, meaning we have to divide.
195 / 39 = 5
The worker cut the board into 5 pieces.