Please help me understand this question

I recently bought the 33 days challenge book of padhleakshay for practice and I am so confused with the solution of this problem. I did solve it and I think the solution of the given problem is wrong pls help.