The key is the P value. If the parabola is f(x) = a ( x - v)2 +h, the P value is P = 1/(4a).
The P value is both the distance from the vertex (v,h) to the focus and the distance from the vertex to the directrix.
So the focus is at (v, h + P) and the directrix is the line
y = h - P.
The above is for an upward opening parabola. Modifications are needed if the parabola opens down or to the left or to the right. However, the P value remains the key.