Question about proving $\mathbb{Z}[i]$ is not UFD
Because $2=(1+i)(1-i)$ and $5=(2+i)(2-i)$, while $3+i=(1+i)(2-i)$ and $3-i=(1-i)(2+i)$. So really, you've just grouped the four prime factors of $10$ together in different ways.
The ring $\mathbb Z$ is a UFD, in spite of the fact that $12=2\times6=4\times3$. There is no contradiction, since these decompositions don't express $12$ as a product of irreducible integers.
$\mathbb{Z}[i]$ is very much a UFD. When you allow complex factors, $4n+1$ "primes" are not primes anymore. They are sums of squares, which can then be rendered as products of complex conjugates; thus
$5=2^2+1^2=(2+i)(2-i)$
The number $2$ is similarly not prime anymore because it is also a sum of squares:
$2=1^2+1^2=(1+i)(1-i).$
Thereby
$10=2×5=(1+i)(1-i)(2+i)(2-i),$
which is unique except for unit factors (factors of $\pm i$ or $-1$).
Here are some rules for identifying actual primes in $\mathbb{Z}[i]$:
1) A positive whole number is prime only if it's an ordinary prime AND it cannot be the sum of two squares. So the ordinary prime has to be one less than a multiple of $4$. Other ordinary primes, with sum-of-two-squares representations, can be converted to complex conjugate products like those above.
2) A complex number $a+bi$ with $a$ and $b$ nonzero is prime only if $a^2+b^2$ is an ordinary prime. If this does not hold, you have factors whose corresponding sums of squares are factors of your $a^2+b^2$ value. Thus
$3+i=(1+i)(2-i)$
where
$3^2+1^2=10,1^2+1^2=2,2^2+1^2=5$.
3) Finally, any prime is linked to others by unit factors (factors of $\pm i$ or $-1$). Thus $3$ is linked to $\pm 3i$ and $-3$, all of which are in effect different images of a single prime. Similarly $1+i$ is linked to $1-i$ and $-1\pm i$ through the unit factors.