Let $G$ be a finite group and $S$ a subgroup of $H$ such that $\mid G \mid/\mid S \mid$ is a prime number. Assume that T is a non-trivial subgroup of $G$ with $S \neq T$ and $ST$ is a subgroup. Prove that $G = ST$.
I have that since $\mid G \mid/\mid S \mid$ is a prime number, the gcd of order of $G$ and $S$ is 1. Then since $T$ is a subgoup of $G$ where $T$ is non-trivial, $S$ and $T$ should also have order gcd of 1. Hence $G = ST$. I think this was a faulty attempt, but I'm lost otherwise.