The answer to this one is fairly simple, but the reasoning leading to the answer is not.
The factorization is
[ (a2+b2)/2 +ab- (a2-b2)/2 +1] [ (a2+b2)/2 -ab +(a2-b2) +1]
This can be checked by multiplying it all out.
The reasoning is that the form of the answer must be
[ first quadratic expression +1 ] [ second quadratic expression +1]
The only quadratic forms that occur in the original expression are:
a2+b2 , ab , a2 -b2
Thus the first and second quadratic expressions must be (different) linear combinations of these three.
So first quadratic expression = A(a2+b2) + B ab + C(a2-b2)
and similarly for second quadratic expression with A' , B' , C'
Multiplying everything out, and demanding that it equals the original expression
results in A = A' =1/2, B = 1, B' = -1, C = -1/2, C' = 1/2