Make an open cover $D^2=\cup_j(U_j\cup V_j)$, for example, by polydisks such that $f$ has zeros only in $U_j$ and $g$ has no zeros in $U_j$. This is possible since zeros of $f$ and $g$ are disjoint.
Solve the 1st Cousin problem with Cousin data $-1/(fg)$ in $U_j$ and $0$ in $V_j$. The solution is a meromorphic function $\phi$ such that $\phi+1/(fg)$ is holomorphic in $U_j$ and $\phi$ is holomorphic in $V_j$. Let $b:=-f\phi$$v:=-f\phi$. Then $-b+1/g$$-v+1/g$ is holomorphic and divisible by $f$ in $U_j$, and thus $b$$v$ is also holomorphic in $U_j$ since $1/g$ is holomorphic in $U_j$. So $b$$v$ is holomorphic everywhere. Now $-b+1/g$$-v+1/g$ is divisible by $f$ also in $V_j$ since $f$ has no zeros in $V_j$. Then since $-bg+1$$-vg+1$ is holomorphic and divisible by $f$, then $a:=(1-bg)/f$$u:=(1-vg)/f$ is holomorphic and $af+bg=1$$uf+vg=1$ as required.
In modern texts they refer to H. Cartan's theoremtheorems A and B, but the case of polydisk of dimension 2 this was in the original paper of Cousin.