\(\left(a^2+b^2\right)\left(x^2+y^2\right)=\left(ax+by\right)^2\)
\(\Rightarrow a^2x^2+a^2y^2+b^2x^2+b^2y^2=a^2x^2+2axby+b^2y^2\)
\(\Rightarrow a^2y^2+b^2x^2=2axby\)
\(\Rightarrow a^2y^2-2axby+b^2x^2=0\)
\(\Rightarrow\left(ay\right)^2-2.ay.bx+\left(bx\right)^2=0\)
\(\Rightarrow\left(ay-bx\right)^2=0\)
\(\Rightarrow ay-bx=0\Rightarrow ay=bx\Rightarrow\frac{a}{x}=\frac{b}{y}\)