Answer:
There might be an error in the question, the result below should be the correct answer. It is not possible for a^2+b^2+c^2 to be the answer.
(a+b+c)(a-b+c) = a^2 +2ac - b^2 + c^2
Explanation:
(a+b+c)(a-b+c) = a^2 - ab +ac + ba - b^2 +bc + ca - cb + c^2 (expanding the two terms in brackets first)
Since ab = ba, ac = ca and bc = cb,
-ab and ba can be cancelled out
bc and -cb can be cancelled out
Hence, (a+b+c)(a-b+c) = a^2 +2ac - b^2 + c^2
This is what I have obtained through expansion, then simplification by cancelling out the common terms.
Could you help check the question again?