Use the cosine and sine half angle formulas:
First let’s solve for ##sin(pi/12)##. If we let ##theta=pi/6## then we see that:
##sin((pi/6)/2)=+-sqrt((1-cos(pi/6))/2)##
We will take the positive root since the angle ##(pi/6)/2=pi/12## which is in the first quadrant where sine is positive.
##color(blue)(sin(pi/12))=sqrt((1-sqrt3/2)/2)=sqrt((2-sqrt3)/4)color(blue)(=sqrt(2-sqrt3)/2##
The cosine method is almost identical. The positive root will again be taken because cosine is also positive in the first quadrant.
##cos((pi/6)/2)=sqrt((1+cos(pi/6))/2)##
Hence:
##color(red)(cos(pi/12))=sqrt((1+sqrt3/2)/2)=sqrt((2+sqrt3)/4)color(red)(=sqrt(2+sqrt3)/2)##