find all continuous functions $f:\mathbb{R}\to\mathbb{R}$ such that for every $x_1,x_2,x_3,y_1,y_2,y_3\in\mathbb{R}$ that $x_1+x_2+x_3=y_1+y_2+y_3$ we have :
$f(x_1)+f(x_2)+f(x_3)=f(y_1)+f(y_2)+f(y_3)$
my attempt:
I replaced $x,y,0,x+y,0,0$ instead of $x_1,x_2,x_3,y_1,y_2,y_3$ therefore we will have
$f(x)+f(y)+f(0)=f(x+y)+2f(0)$
I know if $f$ is a continuous function and we have :
$f(x)+f(y)=f(x+y)$ it results $f(x)=ax \quad\forall a\in\mathbb R$
but here I don't know how to continue I guess it should be $\boxed{f(x)=ax+b\quad\forall x}$ but I don't know how to prove it.
please share your ideas in comments even if they are not compelete. thanks!