Factorise by taking out the common factors:
ab(a2+b2−c2)−bc(c2−a2−b2)+ca(a2+b2−c2)
ab(a2 + b2 - c2) - bc(c2 - a2 - b2) + ca(a2 + b2 - c2)
= ab(a2 + b2 - c2) + bc(a2 + b2 - c2) + ca(a2 + b2 - c2)
= (a2 + b2 - c2)[ab + bc + ca]