We note that,
#color(blue)((1)cosC-cosD=-2sin((C+D)/2)sin((C-D)/2)#
#color(violet)((2)sinC-sinD=2cos((C+D)/2)sin((C-D)/2)#
Here,
#(cosalpha-cosbeta)^2+(sinalpha-sinbeta)^2=4sin^2((alpha-beta)/2)#
Using #(1)and (2)#,we get
#LHS=(cosalpha-cosbeta)^2+(sinalpha-sinbeta)^2.#
#=>LHS=[color(blue)(-2sin((alpha+beta)/2)sin((alpha-beta)/2))]^2#
#color(white)(.................)+[color(violet)(2cos((alpha+beta)/2)sin((alpha-beta)/2))]^2#
#=>LHS=color(red)(4)sin^2((alpha+beta)/2)color(red)(sin^2((alpha-beta)/2))#
#color(white)(.................)+color(red)(4)cos^2((alpha+beta)/2)color(red)(sin^2((alpha-beta)/2))#
#:.LHS=color(red)(4sin^2((alpha-beta)/2)){sin^2(color(green)((alpha+beta)/2))+cos^2(color(green)((alpha+beta)/2))}#
But we know that,
#sin^2theta +cos^2theta=1,where, theta=color(green)(((alpha+beta)/2))#
#LHS=4sin^2((alpha-beta)/2){1}#
#:.LHS=4sin^2((alpha-beta)/2)=RHS#