Let \begin{align*} f(x)&=Ax+B\\ g(x)&=Cx+D, \end{align*} where $A, B, C$ and $D$ are integers.
How can I determine if for specific values of $A, B, C$ and $D$ there is a natural number for $x$ for which
$$g(f(x)) = x \quad\text{or}\quad g(g(f(x))) = x \quad\text{or}\quad f(g(f(x))) = x\quad\text{or}\quad f( \dots g ( \dots g(x) \dots ) \dots ) = x$$
Take the output of either $g(x)$ or $f(x)$ and put that value back into either $g(x)$ or $f(x)$ and repeat with the new value until you get back to the original value.
(Sorry my ability to communicate with mathematics terminology is very limited. I would greatly appreciate if anyone could help me clarify this question)
Alternatively, how can I determine that there would be no natural number solution to my question?
Let's assume for now that $A \geq 2$ and $C \geq 2$, and we will allow ourselves to look for solutions with negative $x$; we will extend to $A, C \geq 0$ later. I suspect this approach would extend to the case $A < 0$ and/or $C < 0$, but the restriction to $x \geq 0$ is harder.
Some notation: I'm going to use $h(x)$ to mean "one of $f$ and $g$", i.e. we are looking for $x$ such that $h(h(\cdots h(x) \cdots)) = x$.
The key observation is that, considered as a function of real numbers, $f$ has a fixed point $\zeta(f) = \frac{-B}{A - 1}$, and that if $x > \zeta(f)$ then $f(x) > x$ and if $x < \zeta(f)$ then $f(x) < x$. Similarly $g$ has a fixed point $\zeta(g) = \frac{-D}{C - 1}$ with the same properties.
Assume without loss of generality that $\zeta(g) \leq \zeta(f)$, and observe that any solution must satisfy $\zeta(g) \leq x \leq \zeta(f)$: if $x > \zeta(f)$ then $x < h(x) < h(h(x)) < \cdots$.
Let $I_0 = x \in \mathbb Z: \zeta(g) \leq x \leq \zeta(f)$. We note that if $x \in I_0$ but $f(x) \notin I_0$ and $g(x) \notin I_0$ then $x$ cannot be a solution. So let $I_1 = \{x \in I_0: f(x) \in I_0 \text{ or } g(x) \in I_0\}$.
But then the same argument applies to $I_1$, and so on. So recursively define $I_{r+1} = \{x \in I_r: f(x) \in I_r \text{ or } g(x) \in I_r\}$.
The sets $I_r$ are all finite and $I_r \supset I_{r+1}$, so there must be some $s$ such that $I_s = I_{s+1} = \cdots$. We claim that there exists a solution $x$ if and only if $I_s$ is non-empty. Certainly, we have already argued that any solution must be an element of $I_s$. Conversely, if $I_s$ is not empty then pick $y_0 \in I_s$, and construct a sequence $(y_i)_{i=0}^{\infty}$ recursively by $y_{i+1} = f(y_i)$ if $f(y_i) \in I_s$, and $y_{i+1} = g(y_i)$ if not (in which case, by definition of $I_s$, $g(y_i) \in I_s$). Every element of this sequence $(y_i)$ is an element of the finite set $I_s$, so there must be some $u, v$ such that $y_u = y_v$. Then $x = y_u$ is a solution to the original problem.
Going back quickly to the special cases of $A$ or $C$ being $0$ or $1$: if $A = 0$ then $x = B$ is a solution while if $C = 0$ then $x = D$ is a solution. Also if $B = 0$ or $D = 0$ then $x = 0$ is a solution.If $A = C = 1$ and both $B$ and $D$ are non-zero then there are no solutions if $B$ and $D$ have the same sign and any $x$ is a solution if $B$ and $D$ have opposite signs. If precisely one of $A$ and $C$ is $1$, assume without loss of generality that $A = 1$, $B > 0$. Then pick $x < \zeta(g)$, and consider $y_i = g^i(x) \mod B$. Again, this is an infinite sequence contained within a finite set, so there must be some repeated value $y_u$; then $g^u(x)$ is a solution.