Ta có:
\(\frac{x+3}{y+5}=\frac{x+5}{y+7}\)
\(\Rightarrow\left(x+3\right)\left(y+7\right)=\left(x+5\right)\left(y+5\right)\)
\(\Rightarrow xy+7x+3y+21=xy+5x+5y+25\)
\(\Rightarrow\left(7x-5x\right)+\left(3y-5y\right)=25-21\)
\(\Rightarrow2x-2y=4\)
\(\Rightarrow2\left(x-y\right)=4\)
\(\Rightarrow x-y=2\)
Thử lại: Do \(x-y=2\Rightarrow x=y+2\) nên ta có:
\(\frac{\left(y+2\right)+3}{y+5}=\frac{\left(y+2\right)+5}{y+7}\)
\(\Rightarrow\frac{y+5}{y+5}=\frac{y+7}{y+7}\)
\(\Rightarrow1=1\) ( thoả mãn )
Vậy hiệu giữa x và y là 2