TGE wrote: 'had been typing' is superior
The simple past tense for this kind of sentence was a primarily American abusage that is now accepted in American English but that loses a lot of the meaning of the past perfect tense.
Benedict was typing / had been typing for three hours before he realised that he had typed the wrong documents.
"Had been typing" is the past perfect progressive tense. This tense is used to show that something started in the past and continued up until another time in the past
...we know, clearly, that it isn't the only way that we can do this.
"Had typed the wrong documents" doesn't sound to me as if he had finished, only that the typing had occurred before another action in the past, "he realized".
How would we ever know, George? Isn't Latin a dead language?
Wouldn't "had been typing the wrong documents" show that he was in the process while "had typed the wrong documents" indicate a finish?