Although AntiTwister's post probably does answer your question, I should point out that a parabola doesn't necessarily have a vertical directrix, so it could be that your problem is underconstrained. If you are really interested in equations like y = a x^2 + b x + c, I suggest you use the term "quadratic function" instead.
Sorry for not replying for a while! I managed to get it all sorted out thanks to your help!
It would be nice if you could give us a brief description of what worked for you. That way this thread would be more helpful to people that find it in the future when they have a similar problem to yours.
The most robust strategy is to consider all targets and all interactions, and pick the best combination. Utility systems are great for this. It helps to mix in "non-targeted" actions as well (running away, healing, etc.) so you can always have something semi-reasonable to do regardless of situation.