Let $f(x)$ be an irreducible polynomial over $\mathbb Q$ of degree $p$, $p$ prime. Suppose that $f(x)$ has exactly two nonreal roots. Then the Galois group of $f(x)$ over $\mathbb{Q}$ is the symmetric group $S_p.$
I have the following ideas (written in a non-rigorous way):
Let $K$ the splitting field of $f(x)$ over $\mathbb{Q}$. By hypothesis, exists $\alpha\in\mathbb{C}\setminus\mathbb{R}$ root of $f(x)$. Further, $\beta=\overline{\alpha}$ is the other root of $f(x$) in $\mathbb{C}\setminus\mathbb{R}$.
Let $\sigma\in Gal(K/\mathbb{Q})$ given by $\sigma(\alpha)=\beta$, $\sigma(\beta)=\alpha$ and $\sigma(k)=k$ for any $k\in K$, $k\neq \alpha,\beta.$
Then $\sigma$ "behaves like a permutation" in $Gal(K/\mathbb{Q})$.
On the other hand, $p\mid |Gal(K/\mathbb{Q})|$. By Cauchy's theorem, there exists an element of order $p$, i.e., a permutation of order $p$.
Therefore, $Gal(K/\mathbb{Q})$ contains a permutation of order 2 and a permutation of order $p$.
A permutation of order $2$ and a permutation of order $p$ generates $S_p$. Therefore, $Gal(K/\mathbb{Q})=S_p$.
But, there is something that is wrong or I do not understand. By hypothesis, $p=[K:\mathbb{Q}]=|Gal(K/\mathbb{Q})|$ but if $Gal(K/\mathbb{Q})=S_p$ then $|Gal(K/\mathbb{Q})|=p!\neq p$...
Actualization 1. Now I have better understood the situation. I have the general idea but the proof is not written rigorously.
Let $K$ the splitting field of $f(x)$ over $\mathbb{Q}$ i.e. $K=\mathbb{Q}(r_1,\ldots, r_p)$ with $r_i$ the roots of $f(x)$.
Let $Gal(K/\mathbb{Q})\times \left\{r_1,\ldots, r_p\right\}\to \left\{r_1,\ldots, r_p\right\}$ an action. Then exists $\psi:Gal(K/\mathbb{Q})\to Aut(\left\{r_1,\ldots, r_p\right\})\simeq S_p$ homomorphism.
Therefore $\psi(Gal(K/\mathbb{Q}))$ subgroup of $S_p$.
$f(x)$ is the minimal polynomial of $r_i$ over $\mathbb{Q}$ for any $i=1,\ldots, p$ then $[\mathbb{Q}(r_i):\mathbb{Q}]=p$. Because $[K:\mathbb{Q}]=[K:\mathbb{Q}(r_i)][\mathbb{Q}(r_i):\mathbb{Q}]$ then $p\mid [K:\mathbb{Q}]=|Gal(K/\mathbb{Q})|$.
Therefore exists $g\in Gal(K/\mathbb{Q})$ of order $p$. Then $\psi(g)$ has order $p$ in $S_p?$
Therefore $\psi(g)$ is a $p$-cycle in $S_p$.
By the other hand, Let $\sigma\in Gal(K/\mathbb{Q})$ given by $\sigma(\alpha)=\beta$, $\sigma(\beta)=\alpha$
Then $\sigma$ "behaves like a permutation" in $Gal(K/\mathbb{Q})$. Therefore $\psi(\sigma)$ is a permutation in $S_p$
We also know that $S_p$ is generated by a permutation and $p$-cycle.
Therefore $Gal(K/\mathbb{Q})\simeq S_p$.