In the given sentence, past perfect tense needs to be used as this tense is used to talk about actions that were completed before some point in the past and here after completing the task of having the lunch , the boys ran out. Hence, ‘had eaten’ is the most appropriate answer. Thus, option (b) is correct.