What is a function that is equidistant from two functions? For example, let $f(x)$ be $x^2$ and $g(x)$ be $x^3 + 1$. It is easy to see that $h(x)=\frac{f(x)+g(x)}{2}$ is not equidistant from $f$ and $g$.

Then, what is a general form of a fucntion $h(x)$ that has the same distance between both of $f(x)$ and $g(x)$ ?

*If it is hard to define $h(x)$ over all range of $x$, limiting a range of $x$ is possible.
Imagine a circle moving so that it is simultaneously tangent to your two curves. Then the locus of the center of this circle would be the "equidistant" curve that you want. In computational geometry, this curve is called the "medial axis", and it has a great many uses. If you want to learn about it, you can get started at this page. The page includes a link to code that computes the medial axis. If your curves are very simple (straight lines and circular arcs, for example), there are closed-form solutions. In more general cases, the best you can do is a polygonal approximation.
It would be: $$y=-\frac{1}{g'\left(x\right)}\left(\frac{\left(f\left(x\right)-g\left(x\right)\right)}{\left(-\frac{1}{g'\left(x\right)}+\frac{1}{f'\left(x\right)}\right)}\right)+g\left(x\right)$$