The very first thing you ought to do is complete all the tutorials included in the documentation (if you haven't done so already). Once you've absorbed that and gotten a basic a basic handle on how to express a procedure in Inquisit syntax, you can move on to study some more elaborate scripts as can be found in the task library. Then start building your own procedure.
Important: If the flanker task you are trying to implement is substantially different from existing ones, it may be way easier to build it from scratch instead of trying to modify an existing script.
As to the concrete questions you've alluded to: You'll want to use the /beginresponsetime attribute to allow for responses prior to full completion of a given <trial> element's stimulus presentation sequence as given in the /stimulustimes or /stimulusframes attribute. You'll want to handle the "responded to early" message by /branch'ing to a separate <trial> element based on latency.
Example:
<block myblock>
/ trials = [1-10=mytrial]
</block>
<trial mytrial>
/ stimulustimes = [0=a; 5000=b]
/ beginresponsetime = 0
/ validresponse = (57)
/ timeout = 10000
/ branch = [if (trial.mytrial.latency < 5000) trial.tooearly]
</trial>
<text a>
/ items = ("A")
</text>
<text b>
/ items = ("B")
</text>
<trial tooearly>
/ stimulusframes = [1=tooearlymsg]
/ trialduration = 500
</trial>
<text tooearlymsg>
/ items = ("You responded too early.")
</text>