\(\sqrt{ax}-\sqrt{by}+\sqrt{bx}-\sqrt{ay}\)
\(=\sqrt{a}\sqrt{x}+\sqrt{b}\sqrt{x}-\left(\sqrt{b}\sqrt{y}+\sqrt{a}\sqrt{y}\right)\)
\(=\sqrt{x}\left(\sqrt{a}+\sqrt{b}\right)-\sqrt{y}\left(\sqrt{a}+\sqrt{b}\right)\)
\(=\left(\sqrt{a}+\sqrt{b}\right)\left(\sqrt{x}-\sqrt{y}\right)\)
\(\sqrt{ax}-\sqrt{by}+\sqrt{bx}-\sqrt{ay}=\sqrt{ax}-\sqrt{ay}-\sqrt{by}+\sqrt{bx}\)
\(=\sqrt{a}.\left(\sqrt{x}-\sqrt{y}\right)-\sqrt{b}.\left(\sqrt{x}-\sqrt{y}\right)=\left(\sqrt{x}-\sqrt{y}\right).\left(\sqrt{a}-\sqrt{b}\right)\)