Rhetorical figures of speech and figures of thought observe a distinction between (respectively) antithesis and antitheton. Antitheton, the figure of thought,
a proof or composition constructed of contraries,
(from "antitheton" at Silva Rhetoricae)
parallels in the domain of thought what antithesis, the figure of speech which denotes a
juxtaposition of contrasting words or ideas,
describes in the context of speech.
As is evident, any fuzziness about the rhetorical domain (expression or thought) will confound the distinction between antithesis and antitheton. Thus it is that antithesis will frequently be used to refer to antitheton, and the other way around.
Putting the distinction between antithesis and antitheton aside for the moment, a more specific rhetorical term for the "paradoxical inversion" you've described might be enantiosis:
Using opposing or contrary descriptions together, typically in a somewhat paradoxical manner.
Enantiosis is a figure of thought. The "somewhat paradoxical" nature of the contrary thoughts produces part of the rhetorical effect of the statements you exampled. This is an especially pertinent designation for the second of your examples,
In order to be a good leader you must know when not to give orders.
In this of your examples, a clear juxtaposition of contrary terms is not employed; rather, it is the concepts, "a good leader" and "not to give orders", that are contrary to each other (and juxtaposed in the expression).
One figure of speech that supports enantiosis is synoeciosis:
A coupling or bringing together of contraries, but not in order to oppose them to one another (as in antithesis).
This is an especially pertinent designation for the first of your examples,
In order to think of a solution you must stop thinking about the problem.
Here, the contrary terms 'solution' and 'problem' are juxtaposed but not opposed.