Not be able to understand logic for solution

can you pls checkout my logic and tell me where I am wrong here