In a PID $\,(a,b):=(a)+(b) = (\gcd(a,b))\,$ follows immediately from $\rm\color{#c00}{contains \!=\! divides}$ for principal ideals, and by the definition (= universal property) of ideal sum and gcd, as below, where $\,e\approx d\,$ means $\,e,d\,$ are associate, i.e. $\,e\mid d\mid e\,$ or, equivalently in a domain: $\,e=ud\,$ for $\,u\,$ some unit (invertible), i.e. $\,e\,$ equals $\,d\,$ up to a unit factor $\,u\,$ - see gcd unit normalization.
$\qquad\qquad\quad\ \ \ \:\!{(a)\!+\!(b)}\ \,=\,\ (d)_{\phantom{|_{|_|}}}$
$\smash[t]{\overset{\rm def}\iff}\ \ \ \ (c)\supseteq (a),(b)\ \!\!\iff\!\! (c)\supseteq (d)_{\phantom{|_{|_|}}}\!\!\!\!,\ $ by ideal sum def'n / univ. property
$\color{#c00}\iff\ \ \ \ c\ \ \,\mid\,\ \ a,\ \ \ b\ \ \!\!\iff c\ \ \mid\ \ d_{\phantom{|_{|_|}}}\!\!\!\!,\ \ \ \ $ by $\rm \color{#c00}{contains = divides}$ for PID ideals
$\smash[t]{\overset{\rm def}\iff}\qquad\ \, \gcd(a,\,b)\ \ \ \approx\ \ \ d,\qquad\qquad\ \:\! $ by the gcd def'n / univ. property
Dually $\,(a)\cap (b) = ({\rm lcm}(a,b))\,$ follows by reversing order in the above proof, i.e.
$\begin{align} {(a)\cap(b)}\ &\ \ =\ \ \,(\ell)\\[.3em]
\smash[t]{\overset{\rm def}\iff}\ \ \ \ (a),(b)\supseteq (m)\ &\!\!\iff\! (\ell)\supseteq (m)\\[.3em]
\color{#c00}\iff\ \ \ \ \:\! a,\ \ \ b\ \ \,\mid\ \ \ m\ \ &\!\!\iff\ \ell\ \ \:\!\mid\:\!\ \ m\\[.3em]
\smash[t]{\overset{\rm def}\iff}\qquad\ \ \:\! \,\ \ {\rm lcm}(a,\,b)\, &\ \ \approx\ \ \ \ \ell
\end{align}$
Note that in lattice / poset language, gcd is the join (lub = least upper bound = supremum = sup), and lcm is the meet (glb = greatest lower bound = infimum = inf) w.r.t. divisibility order. Or, even more abstractly - they can be viewed in the language of category theory as (co)products, using adjoints and Yondea's Lemma. In divisibility group language a domain is a gcd domain $\iff $ its divisibility group is lattice ordered (all $\,{\rm lub}(x,y)$ exist), and analogous divisibility group characterizations exist for a domain to be a UFD, valuation, or Riesz (cf. prior link).
The common notation $(a,b)$ shared for gcds and ideals allows us to exploit analogies between gcd and ideals in common classes of rings enjoying "nice" divisibility theory, e.g. see the links here on rings with divisor theory (which yields a modern view of Kroncker and Dedekind's approaches to restoring unique factorization by adjoining missing gcds)
Applying the above to your final quesiton we conclude
$$\begin{align} (f),(g)\ {\rm are\ comaximal}\!\!\!\overset{\rm def\!\!}\iff& (1) = (f,g) = (\gcd(f,g))\\[.2em]
\iff&\ \, 1\, \approx\, \gcd(f,g)\\[.2em]
&\ \text{ i.e. iff their gcd is a unit (invertible)}\end{align}\qquad$$