When we are given sides and an angle, and a right triangle (seemingly), the easiest method of solving is using trigonometry.
Remember: SOH-CAH-TOA
Looking from the given angle, we are given the opposite side and want to know the hypotenuse. Therefore, we should use the sin function.
sin(34) = 2 / x
(x)(sin(34)) = 2
x = 2 / sin(34)
x = 3.7801
x = 3.7801
---Feel free to round to whereever you need/is required by your assignment.
Hope this helps!