The Gaussian integers are the integers among the complex numbers. They are of the form $a+bi$ where $a,b\in\Bbb Z$ (i.e. $a,b$ are integers) and $i$ is the imaginarius unit: while $\Bbb R$ is drawn horizontally, $i$ is drawn to be the vertical unit (in coordinates of the complex plane: $(0,1)$ corresponds to $i$, and $(x,0)$ to a real number $x$).
Algebraically $i^2=-1$ is all what you have to know about it.
It follows that $(a+bi)(a-bi) = a^2-(bi)^2 = a^2+b^2$, in particular, as Sp.Lemma wrote, $5=(1+2i)(1-2i)$, and you can also check that $2=i(1-i)^2$, and that $i$ 'doesn't matter' here, because divides $1$ (as $1=(-i)i$), hence divides all Gaussian integers (so called unit in the ring $\Bbb Z[i]$ of Gaussian integers).