if $g|ab$ , $g|cd$, $g|ac+bd$, show $g|ac$ and $g|bd$. Struggling to solve this problem.  Professor suggest we look at $p^n$ as one of the prime factorizations of $g$ (note $p^{n+1}$ doesn't divide $g$) and likewise the number of $p$'s in $a, b, c,$ and $d$ respectively are exactly $r, s, t, u$. His hint is to look at the inequalities among $n, r, s, t, u$ that follow from the divisibility assertions.
 A: Suppose that the highest power of $p$ that divides $g$ is $k_g$, i.e., $p^{k_g}\mid g$ and $p^{k_g+1}\nmid g$.  Continuing, let $k_a$ be the highest power of $p$ that divides $a$, $k_b$ the highest power of $p$ that divides $b$, $k_c$ the highest power of $p$ that divides $c$ and $k_d$ the highest power of $p$ that divides $d$.
Since $g\mid ab$, it follows that $k_g\leq k_a+k_b$.  Similarly, since $g\mid cd$, $k_g\leq k_c+k_d$.  We consider a few cases:
Suppose that $p^{k_g}\mid ac$.  Then, since $g\mid ac+bd$, it follows that $p^{k_g}\mid ac+bd$ so $p^{k_g}\mid bd$.  A similar case holds if $p^{k_g}\mid bd$.
On the other hand, if $p^{k_g}\nmid ac$ and $p^{k_g}\nmid bd$.  Then, $k_g>k_a+k_c$ and $k_g>k_b+k_d$.  Combining these inequalities, $2k_g>k_a+k_b+k_c+k_d$.  On the other hand, from the original inequalities, $2k_g\leq k_a+k_b+k_c+k_d$, which is a contradiction, so this case is impossible.
Therefore, $p^{k_g}\mid ac$ and $p^{k_g}\mid bd$.  Since the choice of $p$ is arbitrary, every prime divisor of $g$ has this property.  Hence $g\mid ac$ and $g\mid bd$.
