Trying to recall a MechWarrior novel probably from the 80s or 90s.
Young hotshot MechWarrior is in training to be come a Mech Pilot to fight with his Clan. (I think he was from a prestigious family and wanted to "prove" he was the best). If I recall correctly he was already doing very well certainly one of the top trainees of his class.
During final exam mech battle (like 4 trainees in mechs vs 6 teachers in mechs) he develops a plan to kill 3 of the enemy mechs. The trainees must kill 1 to graduate, 2 to graduate at a higher rank, but, if you can kill 3, you get a very high rank. (Something like kill 1 your rank 1, kill 2 your rank 3, kill 3 your rank 6. Out of ranks like 1 to 10) However, if your mech is killed, you fail.
He pilots a mech he has chosen specifically to aid him in his plan. He does something like a Death From Above Jump to get to the enemy line and knock out 1 of the mech (landing on it and knocking it out, or behind it so he can do an instant kill head shot), he also lands so he is ready to target the mech next to it, before it can react and turn to target him. Knocking it out for his second kill.
Meanwhile his 3 team mates have been targeting the other mechs and knocked out a couple of them. Typically the trainees kill an enemy mech then withdraw so they cant be killed. 2 of them do and withdraw, but 1 of them presses on trying for a second kill. Maybe they get it by stealing the protagonist 3rd kill, by getting the final kill shot, I cant remember)
So the protagonist, who's mech has been getting damaged pretty good but still able to fight press on trying to get the last enemy mech. BUT just as he is about to defeat the last mech, his team mate who has 2 kills, targets him and knocks him out.
His team mate graduates with 3 kills, and he fails cause his mech was knocked out. He now becomes an Outcast, shunned by his family and cant fight with his Clan.
Because he jumped from his battle line to the enemy line to fight them up close, he became a rogue, able to be targeted by either side. While usually other trainees wont target the rogue, (They are focused on kill 1 and withdraw) targeting the rogue is allowed.
IF I remember right this happens in the beginning of the book. (first 1/4 or 1/3rd) and the rest of the book is as he goes and finds a mercenary mech group to fight with and rises in the ranks of that group. It might have been part of a Trilogy where he battles his way up to rejoin his Clan by proving himself.