I have $$7+i,\quad\quad 5+3i\in\mathbb{Z}[i]$$
The answer is given as $$7+i=(5+3i)\cdot 1+(2-2i)$$
$$5+3i = (2-2i)\cdot 2i+(1-i)$$
$$2-2i=(1-i)\cdot 2$$
So $hcf(7+i,5+3i) = 1-i$
What I don't understand is how they're finding what to multiply by, like in the first line, they multiply $5+3i$ by $1$, in the second line they multiply $2-2i$ by $2i$. I tried using the fraction $\frac{7+i}{5+3i}$, and then rationalising the denominator but it got complicated and didn't look anything like what they've gotten. Could someone explain their steps in more detail?