I ---- the task by the time he began to write the report.

Answer: 
had completed
I ---- the task by the time he began to write the report.