Take a line parallel to AB with an end at T
CT∥AB
AB=a+b
CS=a−b
WKT ∠AST=90
In △CST
CS2+CT2=ST2
⟹ST2=(a+b)2+(a–b)2=2ab–(−2ab)=4ab