Here is my solution:
we can put $z = bx-ay $ and $w = ax-by$
So we have: $$f(z) = w$$
from the previous relation we get:
\begin{cases}
x = \dfrac{aw-bz}{a^2-b^2}\\
y = \dfrac{bw-az}{a^2-b^2}
\end{cases}
if $w$ do not depends on $z$ then $\dfrac{\partial w}{\partial z}=0$
hence:
$$\dfrac{\partial w }{\partial z} = \dfrac{\partial w }{\partial x }\dfrac{\partial x}{\partial z }+\dfrac{\partial w}{\partial y}\dfrac{\partial y }{\partial z } = 0$$
we have: $\dfrac{\partial w}{\partial x } = a$, $\dfrac{\partial w}{\partial y } = -b$, $\dfrac{\partial x}{\partial z } = \dfrac{-b }{a^2-b^2 }$ and $\dfrac{\partial y }{\partial z } = \dfrac{-a }{a^2-b^2 }$
Therefore:
$$\dfrac{-ab }{a^2-b^2 }+\dfrac{ab }{a^2-b^2 }=0$$
This is valid only if $a^2\neq b^2 \Rightarrow a = \pm b$
Conclusion $ax-by$ depends on $bx-ay$ only if $a = \pm b$