Hint $\rm\:(1)\:\ I = a\,\mathbb Z\! +\! b\, \mathbb Z\:$ is closed under subtraction so a subgroup of $\left<\mathbb Z, +\right>$ by the subgroup test.
$\rm(2)\:\ \{0\}\ne I\:$ has a least positive $\rm\:c.\:$ Being a group, $\rm\:I \supseteq c\:\mathbb Z.\:$ This is an equality (else there exists $\rm\:d\in I\:$ such that $\rm\:nc < d < (n\!+\!1)c,\:$ so $\rm\ 0 < d\!-\!nc < c\:$ and $\rm\:d\!-\!nc \in I,\:$ contra leastness of $\rm\:c).\:$ Thus $\rm\:a,b\in I = c\,\mathbb Z\:\Rightarrow\:c\:|\:a,b.\:$ $\rm\:d\:|\:a,b\:\Rightarrow\:d\:|\:c = j\,a\!+\!k\,b\:\Rightarrow\: d\le c.\:$ Thus $\rm\,\ c = gcd(a,b),\: $ since $\rm\:c\:$ is a common divisor of $\rm\:a,b\:$ that is greater or equal than any other common divisor $\rm\:d.$
But $\rm\:gcd(a,b\!-\!an) = gcd(a,b)\:$ since if $\rm\:c\:|\:a\:$ then $\rm\:c\:|\:b\!-\!an\iff c\:|\:b.\:$
So $\rm\:\ \ gcd(a,7-a^2) = gcd(a,7) = c,\:$ where $\rm\: c = 7\:$ if $\rm\:7\:|\:a,\:$ else $\rm\:c = 1\:$ if $\rm\:7\nmid a.$