I want to show that if $n_1, n_2, \ldots, n_k$ are integers such that $\gcd(n_1, n_k)=\cdots=\gcd(n_{k-1}, n_k)=1$, then $\gcd(n_1n_2\cdots n_{k-1}, n_k)=1$. I want to preferably use Bezout's Lemma, but I need help refining my argument. Here it is:
From Bezout we know that for $i=1, \ldots, k-1$ there exist integers $a_i$ and $b_i$ such that $a_in_i+b_in_k=1$. Then multiplying these equations together gets us $$(a_1n_1+b_1n_k)\cdots (a_{k-1}n_{k-1}+b_{k-1}n_k)=1.$$ Now, I know that this product will be in the form $$a_1a_2\cdots a_{k-1}(n_1n_2\cdots n_{k-1})+Bn_k=1,$$ since every other term in this large product has $n_k$ as a factor.
Is there any way for me to make this explanation more formal? I feel it is a little hand-wavy. Please don't suggest to me alternate methods of proof; I am compiling notes and I know there is a much easier proof using Euclid's lemma, but Euclid's lemma is introduced after this.