I seriously doubt that is what it is actually called, but I'm not very knowledgeable in this matter.
Conceptually, what I am trying to do is calculate the function of a line/curve that shows the divide between two other functions. As a visual example:

$$Red: f(x) = x^2 + 2$$ $$Blue: g(x) = -(x-3)^2$$
The orange curve would be some function $h(x)$, where all points on one side of the function would be nearest $f(x)$ and all points on the other side would be nearest $g(x)$. I would like to find a way to figure out what $h(x)$ is.
I'm sure something like this already exists, but I don't even know what to google to find out. I'd also like to mention that I'm looking for a general solution, not something specific to quadratic functions.
Thanks in advance.