It’s the subjunctive mood, used in the if-clause of your unreal conditional. This conservative construction is still used a lot in American English, especially in formal writing. Americans often use it in the spoken language as well, but you’re unlikely to hear it in spoken UK English.
The variation “if he were to do something” suggests that the author considers the possibility to be especially remote — more so than if he were to write “if he did something.” Another structure with the same meaning would be "should he do something," which uses inversion to state a hypothesis, rather than a question.
;)