Bézout's identity question Let $x,y,z$ be pairwise coprime integers and $r$ an arbitrary integer $(rxyz\neq 0)$. It is evident that there exist relatively prime integers $a,b$ such that 
$$rz=ax+by$$
However, how does one prove that $a,b$ exist? I know Bézout coefficients can do the tricks but there are not necessarily coprime. Please let me know. Thanks.
 A: Suppose $g=\gcd(x,y)$. Bezout guarantees $a$ and $b$ so that
$$
ax+by=g\tag1
$$
For any $c$, we have
$$
\color{#C00}{(ca+y/g)}x+\color{#090}{(cb-x/g)}y=cg\tag2
$$
where
$$
b\color{#C00}{(ca+y/g)}-a\color{#090}{(cb-x/g)}=1\tag3
$$
Thus, $(2)$ is the equation sought.
A: Suppose we found (for exemple, with Bézout coefficients) $a_0$ and $b_0$ (not necessarily coprime) such that $a_0x + b_0y = rz$. Now, we define
$a_n = a_0 + yn$ and $b_n = b_0 - xn$. It appears that for all $n \in \mathbb N$,
$$
a_nx + b_ny = a_0x + b_0y + nxy - nxy = rz
$$
Now, we want to show that for some $n$, $a_n$ and $b_n$ are coprime. Note $g_n = (a_n,b_n)$. Remark that as $a_nx + b_ny = rz$, any common factor of $a_n$ and $b_n$ divides $rz$. Thus, if the distinct prime factors of $rz$ are $p_1,p_2,\ldots, p_k$ for some $k \in \mathbb N^*$, to ensure $g_n = 1$ we just need to make sure that $p_i \nmid g_n$ for all $i \in [\![1,k]\!]$, that is
$$
ny \not\equiv -a_0 \pmod {p_i} \text{ or } -nx \not\equiv -b_0 \pmod {p_i}
$$
for all $i$. We show that there exists some congruence class for $n$ modulo $p_i$ that works. At least one of $x,y$ is not divisible by $p_i$ (else they would not be coprime). Suppose that $x \not\equiv 0 \pmod {p_i}$. Then $x$ has a multiplicative inverse, $x^{-1}$ modulo $p_i$, and $-nx \not\equiv -b_0 \pmod {p_i} \iff n \not\equiv x^{-1}b_0 \pmod {p_i}$. Thus if $n \equiv x^{-1}b_0 + 1 \pmod {p_i}$, then $p_i \nmid g_n$. By proceeding as above, we can find $u_1,\ldots, u_k$ such that if $n \equiv u_i \pmod {p_i}$ with $i \in [\![1,k]\!]$, then $p_i \nmid g_n$.
Then, we can use the chinese remainder theorem to conclude that there exists $t$ such that if $n \equiv t \pmod {p_1\cdots p_k}$, then $p_i \nmid g_n$ for all $i$. But then we are done.
