Diagramming is great fun, isn't it! The gentleman who shows us the diagrams will hopefully soon answer you.
While we are waiting, may I offer my two bits?
I agree with you: that first sentence is, well, pretty awful. It is, IMHO, ambiguous. It could mean that "he" was surprised when Keira answered the door, or it could mean that the fact that Keira answered the door was surprising to the person who wrote that sentence.
So I think that your sentence is much better. Now let's diagram it, shall we? That is, with words. I am not capable of actually showing a Reed-Kellogg diagram (I am computer illiterate).
Your basic sentence is:
He knocked and was surprised. (compound predicate)
He = subject
knocked = verb
and = conjunction
was surprised = verb
On the door = prepositional phrase modifies "knocked." (What did he knock on?)
When Keira answered = abverbial clause that modifies "was surprised." (When was he surprised?)
HAVE A NICE DAY!
- For Teachers