In my opinion, there's no point of that extra triangle, maybe just there as a red herring...
Anyways, we can use the Pythagorean theorem on 12 and 6 to get y.
We know that:
a2 + b2 = c2
Here is a lovely little picture that could help you wrap your mind around how it works:
So, what does this tell us? Well, now we know this now:
122 = 62 + y2
This now means:
144 = 36 + y2
108 = y2
y = sqrt(108) = 6sqrt(3)