Prove that:

$(cosA - cosB)^2 + (sinA - sinB)^2 = 4sin^2 \left ( \dfrac{A-B}{2} \right )$

LHS

$= (cosA - cosB)^2 + (sinA - sinB)^2$

[Expanding the formulae]

$= cos^2A + cos^2B - 2cosAcosB + sin^2A + sin^2B - 2sinAsinB$

$= (cos^2A + sin^2A )+ (cos^2B + sin^2B )- 2(sinAsinB + cosAcosB)$

[Using trigonometric identity: cos²A + sin²A = 1]

$= 1+1-2(cosAcosB + sinAsinB)$

$= 2 - 2cos(A-B)$

$= 2(1 - cos(A - B)$

[cos2A = 1 - 2sin²A]

$= 2\left [ 1 - \left (1 - 2sin^2 \dfrac{A-B}{2} \right ) \right ]$

$= 2 \left [ 1 - 1 + 2sin^2 \dfrac{A-B}{2} \right ]$

$= 2 × 2sin^2 \dfrac{A-B}{2}$

$= 4sin^2 \dfrac{A-B}{2}$

RHS