Bending Spoons interview question

how do you approach this problem