When two things happen in past: 'Had' goes with the first action ⏰

How will this question be solved? | Arithmetic - AfterBoards Forum | AfterBoards