если -2ad ,то
a²-2ad-(a-b)²=a²-2ad-(a²-2аb+b²)= a²-2ad-a²+2аb-b² =2ab-2ad -b² = 2a(b-d)-b²
------------------------------------------------------------------------------------------------------
если -2ab ,то
a²-2ab-(a-b)²=a²-2ab-(a²-2аb+b²)= a²-2ab-a²+2аb-b² = -b²