$\textbf Z[\sqrt{pq}]$ is not a UFD if $\left( \frac{q}p \right) = -1$ and $p \equiv 1 \pmod 4$. 
Let $p$ and $q$ be primes such that $p \equiv 1 \pmod 4$ and $\left( \frac q p \right) = -1$. Show that $\textbf Z[\sqrt {pq}]$ is not a UFD.

I tried some examples like $p=5$ and $q = 2$. But I have no clue about the general case. Any hint?

Is this from a textbook? If so, I would wager credits to navy beans that they want you to use quadratic reciprocity.
Suppose $q \equiv 1 \pmod 4$ as well. Then we have $$\left(\frac{p}{q}\right) = \left(\frac{q}{p}\right) = -1.$$
We could invoke either $-p$ or $-q$, but since the fundamental unit $\eta$ of $\mathcal{O}_{\mathbb{Q}(\sqrt{pq})}$ has norm $-1$ (Theorem $11.5.7$ in the), if there exists some number $x \in \mathcal{O}_{\mathbb{Q}(\sqrt{pq})}$ such that $N(x) = -p$ or $-q$, then $N(\eta x) = p$ or $q$, contradicting our Legendre symbol calculations.
We conclude that $p$ and $q$ are both irreducible. But then $p \mid (\sqrt{pq})^2$, $q \mid (\sqrt{pq})^2$, yet $p \nmid \sqrt{pq}$, $q \nmid \sqrt{pq}$. Therefore $\mathcal{O}_{\mathbb{Q}(\sqrt{pq})}$ is not UFD.
I hope this is enough of a hint for you to figure out the case $q \equiv 3 \pmod 4$.
