Prove that in a prinicpal ideal domain, two ideals (a) and (b) are comaximal if and only if a greatest common divisor of a and bis 1(in which case (a) and (b) are said to be coprine or realtively prime)

Let be a principal ideal domain and suppose . The following is a series of equivalences, let me know if you need clarification on any of the steps.

for some