Greedy-HELP

Problem
can anyone help me out how to solve this problem?