(ab-1)2 + (a+b)2
=a2b2-2ab+1+a2+2ab+b2
=a2b2+a2+b2+1
=a2(b2+1)+(b2+1)
=(a2+1)(b2+1)
\(\left(ab-1\right)^2+\left(a+b\right)^2\\ =a^2b^2-2ab+1+a^2+b^2+1\\ =a^2b^2+a^2+b^2+1\\ =a^2\left(b^2+1\right)+\left(b^2+1\right)\\ =\left(a^2+1\right)\left(b^2+1\right)\)