The correct option is
D finished
The given sentence states an action that took place in the past "half an hour ago".
Option D: 'Finished' is a past tense verb and states an action that happened in the past: "half an hour ago". Hence option D is correct.
Option
A:
'Has finished' is in the present perfect tense. It states an action that has just been completed. But the action here completed half an hour ago.
Option B: 'Had finished' is in the past perfect tense. It states an action that happened in the past, before another action began.
But here, only one action has taken place 'to finish the work'.
Option C: 'Was finishing' is in the past continuous tense. It states a continuous action
that happened in the past. Generally, along with this action another event takes place that interrupts the continuous action. Here, there isn't any. Plus, the action has already been completed.
Hence options A, B and C are wrong.