Solution 1:

You need the past perfect (also called the pluperfect) tense:

I was waiting in the back of the line because I had punched the son of the principal.

The past perfect tense indicates an action that was completed at some point in the past before something else happened.

If you search for "past perfect tense" you will find plenty of examples online.

(By the way, in BrE we would say "at the back of the line", unless you mean you were near the back of the line, among other people. And we would call it a queue, not a line.)