I'm trying to solve this problem from my abstract algebra course:
Being $z_1=39-8i$ and $z_2=7+i$ elements from the ring of Gauss integers, $\mathbb{Z}[i]=\{a+bi \mid a,b\in\mathbb{Z}\}$. Find a greater common divisor of both terms, $d=\text{gdc}(z_1,z_2)$, and find elements $x_1,x_2\in\mathbb{Z}[i]$ such that $d=x_1z_1 + x_2z_2$.
I have no idea how to proceed with this kind of exercises, I've seen other ones similar to this one in my book and want to find a method to approach these kind of exercises. I decided to post this one in particular because the ring $\mathbb{Z}[i]$ seemed especially weird but interenting, so I assumed this must be one of the most difficult ones of this kind of problems.
How can I solve this? Any help will be appreciated, thanks in advance.