Let there be the random variables $X$, $Y$, and $Z$.
$f_X$, $f_Y$, and $f_Z$ are known.
For any $f_X$, $f_Y$, and $f_Z$, does there always exist a unique function $g$ such that $Z = g(X, Y)$, and can we solve for $g$?
Here is another twist. Now let us introduce the random variable $W$ with known PDF $f_W$.
For any $f_W$, $f_X$, $f_Y$, and $f_Z$, is there always a unique function $h$ such that $Z = h(W \cdot X, Y)$, and can we solve for $h$?
Certainly not. For all we know, $Z$ might be independent of $X$ and $Y$. Then $Z$ can't be a function of $X$ and $Y$ unless it is almost surely constant.
Maybe the question you're really thinking of is something like this: given densities $f_X$, $f_Y$ and $f_Z$, do there exist random variables $X$, $Y$ and a function $g$ such that $X$ has density $f_X$, $Y$ has density $f_Y$, and $g(X,Y)$ has density $f_Z$?
Uniqueness is certainly not going to hold in general, as easy examples will show (try $f_X = f_Y =f_Z$ uniform on $[0,1]$).