On page 230 of Dummit and Foote's Abstract Algebra, they say: the units of $\mathbb{Z}\left[\frac{1+\sqrt{-3}}{2}\right]$ are determined by the integers $a,b$ with $a^2+ab+b^2=\pm1$ i.e. with $(2a+b)^2+3b^2=4$, from which is is easy to see the group of units is a group of order $6$ given by $\{\pm1,\pm\rho,\pm\rho^2\}$ where $\rho=\frac{-1+\sqrt{-3}}{2}$.
First, why change the characterization of unit from integers solutions of $a^2+ab+b^2=\pm1$ to integers solutions of $(2a+b)^2+3b^2=4$? How did they arrive at their answer?