I have two extensions of finite groups, letting $C_m$ denote the cyclic group of order $m$:
$$1 \to C_n\to G\to C_3\to 1 \tag{1} $$
$$1 \to C_3\to G\to H\to 1 \tag{2} $$
where $n$ is some composite number, i.e. not a single prime or prime power, and so $H$ is not necessarily cyclic. In other words $G$ is metacyclic and is isomorphic to both $C_n.C_3$ and $C_3.H$.
What can be said about this situation, with only this information at hand? In particular I am interested in the relationship, if any, between $C_n$ and $H$ (other than they have the same order!).
I'm going to assume that (1) is not a direct product, else everything is clear. In particular, this requires $3$ to divide $n$. Write $n=3^am$, where $3\nmid m$. Let $K$ be the kernel of (1). Any normal subgroup $P$ of order $3$ lies in $K$, else $G$ is a direct product $K\times P$. Hence $G$ possesses a unique normal subgroup of order $3$. Thus $H=G/P$ is isomorphic to a group $C_{n/3}\cdot C_3$, i.e., some extension with normal subgroup $C_{n/3}$ and quotient $C_3$.
Write $K=X\times S$, where $X$ is the Hall $3'$-subgroup and $S$ is the Sylow $3$-subgroup. In $H$, the action of the $C_3$ on $X$ is the same in $G$, so we concentrate on the structure of $S$. This is a $3$-group with a cyclic subgroup of index $3$, hence $S$ is known, and is one of:
The same is, of course, true for the Sylow $3$-subgroup of $G$. So to understand which of these can occur as $S$, we need to quotient out one of these by a normal subgroup of order $3$ (because we start with the Sylow $3$-subgroup of $G$).
In the first case we obviously obtain $C_{3^{a-1}}$. Certainly in the second case we obtain $C_{3^{a-2}}\times C_3$. In the third case we are quotienting out by $\langle x^{3^{a-2}}\rangle$, and then the group becomes abelian.
So we conclude that $H$ is (any) extension $C_{n/3}\cdot C_3$, where the Sylow $3$-subgroup of $H$ is abelian.
Edit: I have altered a little above. I was tacitly assuming in the original answer that the extension (1) was a split extension but not a direct product. This is not true in general, and the case 1. above can therefore occur. It is definitely possible that $C_9$ can be the Sylow $3$-subgroup, for example: the group $C_7\rtimes C_{3^a}$ is a group of the form above for any $a\geq 1$. I also corrected the exponents in the list of possible $3$-groups.