To determine which trig function to use, you should look at the relationship between the side and the given angle.
[1] The side (10) in relation to the angle (45) is it on the opposite. The relation to x, is that it is the hypotenuse of the triangle (longest side/opposite of the right angle) .
The trig function that has both opposite & hypotenuse is sin (SOH), opposite over hypotenuse.
Therefore, plugging in the values you would get: sin(45) = 10 / x
From here, you could solve for "x"
sin(45) * x = 10
x = 10/sin(45)