We use sine here. Sin (45) = opposite/hypotenuse = 12/b
Sin (45) = sqrt (2)/2
So, sqrt(2)/2 = 12/b
Cross multiply:
24 = sqrt(2) * b
Divide both sides by sqrt(2):
b = 24/sqrt(2) = 12 * sqrt(2).