Four Number Theorem : Let $a$, $b$, $c$, $d$ be integers such that $ab = cd$.
Solution 1:
Euler's Four Number Theorem ($\rm 4NT$) shows how to derive a common refinement of two factorizations $\,ab = cd\,$ - see $(3)$ below. It is a fundamental result in divisor theory very closely related to uniqueness of prime factorizations, so we give a few proofs below to help lend insight.
$(1)\ $ By here $\,a\mid cd\Rightarrow a = xy,\ x\mid c,\ y\mid d,\,$ so $\, c = xz,\ d = yw,\,$ for some $\,z,w\in\Bbb Z,\,$ thus $\,b = cd/a = xz(yw)/(xy) = zw$.
$(2)\ $ by unique fractionization equal fractions are scalings of some reduced fraction $\,\color{#c00}{x/w}\,$ so
$$\dfrac{a}d = \dfrac{c}b\ \Rightarrow\ \begin{align} &a = y\,\color{#c00} x,\ \ c = z\, \color{#c00}x\\ &d = y\:\! \color{#c00} w,\ \ b = z\:\! \color{#c00}w \end{align}\qquad$$
$(3)\ \,\color{#90f}{g :=(a,b,c,d)}.\,$ Cancelling $\,g^2\,$ from $\,\color{#0a0}{ab}=\color{#c00}{cd}\,$ reduces to case $\,\color{#90f}{g = 1}\,$ with solution
$$ \overbrace{\underbrace{(a,c)}_{\textstyle x}\underbrace{(a,d)}_{\textstyle y}}^{\textstyle \color{#0a0}a}\,\overbrace{\underbrace{(b,c)}_{\textstyle z}\underbrace{(b,d)}_{\textstyle w}}^{\textstyle\color{#0a0} b}\, =\, \overbrace{\underbrace{(c,a)}_{\textstyle x}\underbrace{(c,b)}_{\textstyle z}}^{\textstyle\color{#c00}c} \overbrace{\underbrace{(d,a)}_{\textstyle y}\underbrace{(d,b)}_{\textstyle w}}^{\textstyle\color{#c00}d}\qquad$$
by $\ (a,c)(a,d) = (a(a,c,d),\color{#c00}{cd}) = (a(a,c,d),\color{#c00}{ab}) = a(\color{#90f}{a,c,d,b}) = a,\,$ and similarly for the other products (by symmetry). Here $\,(a,c)(a,d)(b,c)(b,d)\,$ is a common refinement of the two factorizations $\,ab = n = cd.\,$ See here for more details on such gcd arithmetic (& ideal arithmetic).
Remark $ $ The solution is summarized by the following Shreier refinement matrix formulation of Euler's Four Number Theorem for the proofs $(2)$ and $(3)$ above
$$\begin{array}{c | c c} (2) & c & d\\ \hline a& x & y\\ b& z & w \end{array}\qquad \begin{array}{c | c c} (3)&\ c & d\\ \hline a&(a,c) & (a,d)\\ b& (b,c) & (b,d) \end{array}\qquad$$
where the row label is the product of the row elements, e.g. $\, a = xy = (a,c)(a,d)\,$ and the column label is the product of the column elements, e.g. $\,c = xz = (a,c)(b,c).\,$ Analogous refinement matrices can display the common refinements of any two factorizations of the same element in a UFD or gcd domain, e.g. see this answer, which also explains how this is equivalent to uniqueness of prime factorizations (and many well-known equivalent properties).
Solution 2:
Firstly note that it is sufficient to prove the theorem when $a,b,c,d,x,y,z,w$ are all natural numbers. For if any of the given numbers is $0$ then the solution tuple $(x,y,z,w)$ is trivial and if there are negatives involved you can look for $x,y,z,w$ for $\lvert a \rvert,\lvert b \rvert, \lvert c \rvert, \lvert d \rvert$ and then adjust for signs.
If $b = 1$ you can take $(x,y,z,w) = (c,d,1,1)$, say the result holds for all $a,b,c,d$ when $1 \leq b < n$ and say $an = cd$ for some $a,c,d$. Let $p$ be a prime divisor of $n$ then $p \vert c$ or $p \vert d$. Say $p \vert c$, then we'll have an equation of the form $am = c'd$ where $n=mp,c=pc'$ and $1 \leq m<n$ so by hypothesis there exists $(r,s,t,u)$ all naturals such that $a = rs, m = tu, c' = rt, d = su$ that gives $n = (pt)u$ and $c = r(pt)$, therefore $ (r,s,pt,u)$ is the tuple corresponding to $an = cd$, similarly one can find the tuple if $p \vert d$. This proves the theorem for natural numbers by induction.
Solution 3:
Here are some cases to consider:
If the products are equal to $0$, WLOG, if $a=0$, then $c$ or $d$ must be $0$.
If $a=0$ and $c=0$, let $x=0$. If $d=0$, then we let $y=0$ and choosing $w$ and $z$ should be easy. If $d\ ne 0$, we let $w=1$ and you can choose your $y$ and $z$ accordingly.
Now consider the cases where the product is non-zero.
$$\frac{a}{c}=\frac{d}{b}=\frac{y}{z}$$ where $y$ and $z$ are chosen to satisfy $\gcd(y,z)=1$. Try to argue how to determine $w$ and $x$ from here.