((a+b)+c)^2=(a+b)^2+2(a+b)c+c^2=a^2+2ab+b^2+2ac+2bc+c^2=a^2+b^2+c^2+2(ab+ac+bc)
a^2+b^2+c^2=(a+b+c)^2-2(ba+ac+bc)=7^2-2*7=49-14=35
((a+b)+c)^2=(a+b)^2+2(a+b)c+c^2=a^2+2ab+b^2+2ac+2bc+c^2=a^2+b^2+c^2+2(ab+ac+bc)
a^2+b^2+c^2=(a+b+c)^2-2(ba+ac+bc)=7^2-2*7=49-14=35