I am not able to solve , pease provide me the code to understand the solution

not able to solve , please provide me the code to understand the solution