Observe that
5/12 = 1/4 + 1/6
so that
tan(5π/12) = tan(π/4 + π/6)
Then
tan(5π/12) = sin(π/4 + π/6) / cos(π/4 + π/6)
… = (sin(π/4) cos(π/6) + cos(π/4) sin(π/6)) / (cos(π/4) cos(π/6) - sin(π/4) sin(π/6))
… = (cos(π/6) + sin(π/6)) / (cos(π/6) - sin(π/6))
(since sin(π/4) = cos(π/4) = 1/√2)
… = (√3/2 + 1/2) / (√3/2 - 1/2)
… = (√3 + 1) / (√3 - 1)
… = (√3 + 1) / (√3 - 1) × (√3 + 1) / (√3 + 1)
… = (√3 + 1)² / ((√3)² - 1²)
… = ((√3)² + 2√3 + 1²) / (3 - 1)
… = (3 + 2√3 + 1) / 2
… = (4 + 2√3) / 2
… = 2 + √3 … … … (C)
If you insist on using the half-angle identity, recall that
sin²(x) = (1 - cos(2x))/2
cos²(x) = (1 + cos(2x))/2
==> tan²(x) = (1 - cos(2x)) / (1 + cos(2x))
Let x = 5π/12. The angle x lies in the first quadrant, so we know tan(x) is positive.
==> tan(x) = +√[(1 - cos(2x)) / (1 + cos(2x))]
We also know
cos(2x) = cos(5π/6) = -√3/2
which means
tan(x) = tan(5π/12) = √[(1 - (-√3/2)) / (1 + (-√3/2))]
… = √[(1 + √3/2) / (1 - √3/2)]
… = √[(2 + √3) / (2 - √3)]
… = √[(2 + √3) / (2 - √3) × (2 + √3) / (2 + √3)]
… = √[(2 + √3)² / (2² - (√3)²)]
… = √[(2 + √3)² / (4 - 3)]
… = √[(2 + √3)²]
… = 2 + √3