Unable to get the approach

i am unable to get the appraoch of this problem … how can we apply dp here ?? what should be the thought process in making the solution?? the hint video is very confusing … and didn’t find it helpful plz help on this

why is no one replying here??