So, we're going to need some formulas here. There are several formulas for the tangent of a half angle (I'm choosing that one because pi/12 is not an angle of a "special" triangle, but pi/6 is! pi/6 is equal to 30°. (pi radians equals 180°) and pi/12 is half of pi/6. So, I'm going to go with this one:
tan x/2 = sinx/(1+cosx)
that makes the first part of your expression equal to:
tan pi/12 = tan (pi/6)/2 = sin pi/6 / (1+cos pi/6) ...
to find sine and cosine of pi/6 exactly, take out an equilateral triangle (all angles equal to 60) with sides of 2 units. Now, cut it in half. You have a right triangle with angles 60° and 30° (AKA pi/6). The hypotenuse is still equal to 2. The side that got cut in half is equal to 1 now. And the third side is root 3 (pythagorean theorem).
Thus, the sine of pi/6 is 1/2 and the cos pi/6 is (root 3)/2. so that makes
tan pi/12 = tan (pi/6)/2 = sin pi/6 / (1+cos pi/6) = (1/2)/[1+root(3)/2]. Multiply the numerator and denominator by 2 and you get 1/(2+sqrt3).
NOW! the second part requires a formula for the cosine of a difference of two angles: cos(A−B) = cos A cos B + sin A sin B. So...cos(3pi/2-pi/12) = cos 3pi/2 cos pi/12+sin 3pi/2 sin pi/12. The cos of 3pi/2 is equal to zero. You can check this by drawing a quick graph of y=cosx or by examining the x coordinate of the point on the unit circle which corresponds to 3pi/2 or 270°. SO that gives us sin 3pi/2 sin pi/12. The sin of 3pi/2 is negative one. Again, look at the graph of y=sinx or the y coordinate one the unit circle. Now we have -sin pi/12 for the second half of the expression. Last formula
sin x/2 = sqrt (1-cosB)/2. since pi/12 is half of pi/6 or 30° this is now sqrt (1-cos 30°)/2 or sqrt( 1 - sqrt(3)/2)/2.
So, we have 1/(2+sqrt(3)) - sqrt( 1 - sqrt(3)/2)/2. Multiplying that last fraction by 2 in the numerator and denominator gives the slightly prettier 1/(2+sqrt(3)) - sqrt( 2 - sqrt(3))/4.
Content will be erased after question is completed.