I'm assuming 0.766 is just sin 58.
sin of an angle is the opposite measure divided by the hypotenuse.
sin 58 = x/12, your second option
To keep going and solve, you would multiply both sides by 12 to isolate the variable x and cancel out 12 on the right side, leaving you with x = 12(sin 58)