To rewrite the sentence using inversion for formal/emphatic style, follow this structure:
Had + subject + past participle, subject + would have + past participle
Original:
If I had known about the delay, I would have taken a different route.
With inversion:
Had I known about the delay, I would have taken a different route.
This form is formal and often used in writing or speeches for emphasis.