Would you be kind enough to explain to me the following small mystification?
Who offered you a good job? ( “who” is a subject)
Who did you offer a good job? ("who" is not a subject, “you” is the subject}
Who opened the door? ( “who” is a subject”)
Who did not open the door? (“who” is an inactive subject)
Thank you for your efforts.
"To whom did you offer a good job" Strictly, there is no objective "who". It's "whom". But this is changing.
"Who did you offer a good job to" is more common.
(By the way "offered to you" is implied, but not needed, in the first sentence.)
The second is correct grammatically. It's also possible semantically if someone was supposed to open the door, and you want to know who that someone was.