Can we derive the distribution of a random variable based on a dependent random variable's distribution?
Yes you can, provided you know about $f$ and $g$. Expression $X3 = f(X1, g(X1))$can be written as $X3 = h(X1)$ where $h$ takes into account both $f$ and $g$. After this finding the PDF is simple by differentiating the CDF:
$$ F_{X3} (x3) = P(X3 \leq x3) =  P(h(X1) \leq x3) = P(X1 \leq h^{-1}(x3))$$

$$ \frac {d F_{X3} (x3)}{dx3}  = \frac {d P(X1 \leq h^{-1}(x3))}{dx3} = f_{X3}(x3)$$

NOTE: The conventions followed are the same as used in the field of Probablity

(Take care of the function inversion step in non-monotonic cases)

Check these lectures.