Solution:
First, let S be the sum of all possible products of three distinct variables from the set {a,b,c,d,e,f}, i.e. S=abc+abd+abe+⋯+def. Now, we assert that
(a+b+c+d+e+f)3+2(a3+b3+c3+d3+e3+f3)−3(a+b+c+d+e+f)(a2+b2+c2+d2+e2+f2)=6S
To see this, note that, when the left-hand side is expanded, the terms obtained come in three forms: a3 (i.e. cubes of one variable), a2b (squares of one variable times another), and abc (products of three different variables). Each term of the form a3 has coefficient 1 in (a+⋯+f)3, 2 in 2(a3+⋯+f3), and −3 in −3(a+⋯+f)(a2+⋯+f2), for a total coefficient of 0; the terms of the form a2b have respective coefficients 3,0,−3, for a total of 0; those of the form abc have coefficients 6,0,0, for a total of 6. Since the right side of (1) consists of the abc-type terms with coefficient 6, the assertion is proven.
However, the given tells us that the left-hand side of (1) is zero, so S=0. Now, let p=ab−(cd+ce+cf+de+df+ef). We claim that the following holds for all numbers x:
(x+c)(x+d)(x+e)(x+f)=(x−a)(x−b)(x2−p)+abp+cdef.
We can verify this by comparing coefficients for corresponding powers of x.
The coefficient of x4 on both sides is 1; the coefficient of x3 is c+d+e+f on the left and −(a+b) on the right, but the given implies that these are equal. The coefficient of x2 is cd+ce+cf+de+df+ef on the left and ab−p on the right; these are equal by the definition of p. The coefficient of x is cde+cdf+cef+def on the left and ap+bp on the right. To see that these are equal, observe that
cde+cdf+cef+def−(a+b)p=cde+cdf+cef+def−(a+b)ab+(a+b)(cd+ce+cf+de+df+ef)=(S−[abc+abd+abe+abf])−(a+b)ab=−ab(c+d+e+f+a+b)=0
where we have used the definition of S for the second equality and the fact that S=0 for the third. Finally, the constant term equals cdef on both sides. Thus, equation (2) holds. Plugging in x=a and x=b, we find
(a+c)(a+d)(a+e)(a+f)=(a−a)(a−b)(a2−p)+abp+cdef=abp+cdef(b+c)(b+d)(b+e)(b+f)=(b−a)(b−b)(b2−p)+abp+cdef=abp+cdef
Since the right-hand sides match, we are done.