Let $r$ and $s$ be distinct nonzero rational numbers. Find all functions $f:\mathbb R \to\mathbb R$ such that $f\left(\frac{x+y}r\right) = \frac{f(x)+f(y)}s$.
My attempt:
If we have $x=0$ and $y=0$, Then we have $f(0) = \frac{f(0)+f(0)}s \implies s=2$.
If we set $x=0$, we get $s\times f\left(\frac yr\right)-f(y)=f(0)$. $(1)$
If we set $y=0$, we get $s\times f\left(\frac xr\right)-f(x)=f(0)$. $(2)$
Setting $(1)$ and $(2)$ equal, $s\times f\left(\frac xr\right) - s\times f\left(\frac yr\right) = f(x) - f(y)$.
I don't know where this is going and need help.
You can show that the only solutions are constant functions, and in case $ s \ne 2 $, that constant must be zero (otherwise, any constant function will work).
Let $ y = 0 $ in $$ f \left( \frac { x + y } r \right) = \frac { f ( x ) + f ( y ) } s \tag 0 \label 0 $$ to get $$ f \left( \frac x r \right) = \frac { f ( x ) + f ( 0 ) } s \text . \tag 1 \label 1 $$ You can use \eqref{1} to rewrite the left-hand side of \eqref{0} and get $$ f ( x + y ) + f ( 0 ) = f ( x ) + f ( y ) \text . \tag 2 \label 2 $$ Hence, if we define $ A : \mathbb R \to \mathbb R $ with $ A ( x ) = f ( x ) - f ( 0 ) $, \eqref{2} tells us that $ A $ is an additive function. Cauchy's functional equation then lets us deduce $$ A \left( \frac x r \right) = \frac { A ( x ) } r \text , \tag 3 \label 3 $$ as $ r $ is rational. On the other hand, \eqref{1} can be rewritten as $$ A \left( \frac x r \right) + f ( 0 ) = \frac { A ( x ) + 2 f ( 0 ) } s \text , $$ which together with \eqref{3} yields $$ ( s - r ) A ( x ) + r ( s - 2 ) f ( 0 ) = 0 \text . \tag 4 \label 4 $$ As $ A ( 0 ) = 0 $, letting $ x = 0 $ in \eqref{4} we have $ r ( s - 2 ) f ( 0 ) = 0 $. Putting this back into \eqref{4} we get $ ( s - r ) A ( x ) = 0 $, which shows that $ A $ is the constant zero function, as we know that $ s \ne r $. This means that for all $ x \in \mathbb R $ we have $ f ( x ) = f ( 0 ) $; in other words, $ f $ must be constant. In case $ s \ne 2 $, using $ r ( s - 2 ) f ( 0 ) = 0 $ and $ r \ne 0 $, $ f $ must be constantly zero. In case $ s = 2 $, you can check that any constant function $ f $ satisfies \eqref{0}.