[tex]P(x)=(x+a)^5 + (x+c)^5 + (a-c)^5[/tex]
If [tex]x+a[/tex] is a factor of [tex]P(x)[/tex], then [tex]-a[/tex] is a root of [tex]P(x)[/tex].
Therefore
[tex](-a+a)^5+(-a+c)^5+(a-c)^5=0\\\\0^5+(-1(a-c))^5+(a-c)^5=0\\\\(-1)^5(a-c)^5+(a-c)^5=0\\\\-(a-c)^5+(a-c)^5=0\\\\0=0[/tex]