He went home with 72 marbles after tripling his stock. That means he had 72/3 = 24 before school ended.
If he lost half at lunch, he had 24 * 2 = 48 before lunch.
During the third break, he increased he stock by 1/3. That means that 48 = 4/3 * x, so he had 36 before the third break.
During the second break he lost 4, so before he had 36 + 4 = 40.
During the first break he doubled his marbles, so before he had 40 / 2 = 20.