The question reads:
Find the positive generator of the smallest ideal in $\mathbf Z$ containing the following ideals:
a. $(4)$ and $(18)$. My answer is $(m)=(4)$.
b. $(6)$ and $(35)$. My answer $(m)=(3)$.
My reasoning for these solutions is that the ideal for the ring of integers is a set closed under addition and multiplication where $A=\{k(m):k\in\mathbf Z\}$ and $A$ is the ideal. Since the positive generator should be the smallest containing I chose $(4)$ for "a" and $(3)$ for "b". I believe there is a word for these numbers ($\gcd$ or $\operatorname{lcm}$?).
Additionally, how would the solution differ if the question had instead asked
"Find a (single) generator of the ideal in $\mathbf Z$ containing the following ideals"?
Thank you for your time and guidance!
If $m,n \in \Bbb Z$, then the smallest ideal containing $(m)$ and $(n)$ is the ideal $(\gcd(m,n))$. For (a) this means the ideal $(2)$, while for (b) this means the ideal $(1) = \Bbb Z$ (because $6$ and $35$ are coprime).
Each ideal $(m) \subseteq \Bbb Z$ is generated by any invertible element of $\Bbb Z$ multiplied by $m$. Since the only invertible elements of $\Bbb Z$ are $1$ and $-1$, the ideal $(m)$ is generated by $m$, as well as by $-m$.
In your examples, $(2)$ is generated by $2$, and is also generated by $-2$; clearly the positive generator is $2$. Similarly, the positive generator of $\Bbb Z$ is $1$.
If the question had been modified by dropping the positivity requirement, any of $2$ and $-2$ (and, respectively, $1$ and $-1$) would have been a correct answer.