3.
2 . Exercise: https://www.tolearnenglish.com/exercises/exercise-english-2/exercise-english-78970.php
http://www.grammaring.com/only-after-only-if-only-in-this-way-etc-not-until
When only after, only if, only in this way etc. are placed at the beginning of the sentence for rhetorical effect, the subject and auxiliary are inverted:
Only after lunch can you play. (You can only play after lunch.)
Only after finishing your homework can you play. (You can only play after you finish your homework.)
Only after you have finished your homework can you play. (You can only play after you have finished your homework.)
Only by guessing can you solve this puzzle. (You can only solve this puzzle by guessing.)
Only if everybody agreed would I accept this position. (I would only accept this position if everybody agreed.)
Only in this way does this machine work. (This machine only works in this way.)
Only then did they discover his secret. (They only discovered his secret then.)
Only when he needed some help did he call me. (He only called me when he needed some help.)
Only when I filled my glass did I notice that it was broken. (I only noticed that my glass was broken when I filled it.)
The last sentence can be rephrased as:
Not until I filled my glass did I notice that it was broken. (I didn’t notice that my glass was broken until I filled it.)
If only is followed by the subject at the beginning of the sentence, there is no inversion:
Only you can understand. (No one else can understand.)