hello, there were no previous sentences, this was just an example to see how "to rub sb up the wrong way" is used.
The example is related to a novel. In this case a boy is going out with another boy and he is in a state of confusion when the news of their relationship is out
If it's just an example sentence, then I can't see any reason for the student to use the past perfect where he did. It would be possible to use the past perfect in the second part of the sentence, by writing for example: He worked himself up into a state of confusion after the news of his relationship with her* had come out.
Can you ask the student why he chose that tense?
*Incidentally, the word "her" also looks wrong if, as you say, the story was about a boy in a relationship with another boy