I have two sentences.
The first sentence can eliminate 在. About the reason why 在 turns up, in my opinion, it can be the basic structure:
Subject + When + Where + How + Verb + Object
because 老师公布考试时间 is a sentence, adding "之后" just make it indicate the time (老师公布考试时间之后). So between Subject and Time, we need a preposition. However, I cannot explain the grammar structure of the first sentence (lmao).
2 sentences may not follow the basic structure (and I misunderstood). In case I am correct:
1/ why can the first sentence be eliminated 在？
2/ If I am wrong, is there any other structures that match both sentences?