Since $\text{gcd}(a,b) = 1$, we have that there exists $x,y \in \mathbb{Z}$ such that $ax+by = 1$ Hence, we have that $(a+b)x + b(y-x) = 1$ and $a(x-y) + (a+b)y = 1$ Squaring and adding the two equations, we get that $(a+b)^2 x^2 + b^2(y-x)^2 + 2b(a+b)x(y-x) + (a+b)^2 y^2 + a^2(x-y)^2 + 2a(a+b)y(x-y) = 2$ Rearranging the above equation, we get that $(a+b) \left( (a+b) (x^2+y^2) + 2 (x-y) (ay-bx) \right) + (a^2 + b^2)(x-y)^2 = 2$ Hence, we have that $(a+b) X + (a^2 + b^2) Y =2$ where $X = \left( (a+b) (x^2+y^2) + 2 (x-y) (ay-bx) \right)$ and $Y = (x-y)^2$. This implies that $\text{gcd}(a,b) \vert 2$.
Hence, $\text{gcd}(a,b) = 1 \text{ or } 2$