As below
Let us consider two unit vectors in X-Y plane as follows :
##hata=cosAhati+sinAhatj##
##hatb=cos(90+B)hati+sin(90+B)##
##=-sinBhati+cosBhatj##
Now
## hata xx hatb=(cosAhati+sinAhatj)xx(-sinBhati+cosBhatj)##
##=>|hata||hatb|sinthetahatk=cosAcosB(hatixxhatj)-sinAsinB(hatjxxhati)##
Applying Properties of unit vectos ##hatihatjhatk##
##hatixxhatj=hatk ##
##hatjxxhati=-hatk ##
##hatixxhati= null vector ##
##hatjxxhatj= null vector ##
and
##|hata|=1 and|hatb|=1 As both are unit vector ##
Also inserting
##theta=90-(A-B)##
Finally we get
##=>sin(90-(A-B))hatk=cosAcosBhatk+sinAsinBhatk##
##:.cos(A-B)=cosAcosB+sinAsinB##