...
You'll need 2 triggers. 1st one is the trigger to give you a quest. 2nd trigger will be executed when you killed the unit.
1st trigger
Event: you may use "inside range" or unit enter region
Condition: -
Action: Turn off trigger, make a quest, set it into as a quest variable, make a quest message for that quest.
2nd trigger
Event: unit dies, or player unit dies
Condition: unit comparison, dying unit equals to X
Action: Turn off trigger, wait around 2.00 sec, mark that quest variable as completed, make a quest message for the completed quest.