Using the method of SOHCAHTOA.
We can use Sines because it has provided us the angle and the length.
We can do sin(45)=5/x, this is because 5 being the opposite and x being the hypotenuse.
Move x to the other side by multiplying by x or x/1
x/1 • sin(45)=5/x • x/1
Then you should have:
x sin(45)=5
We are solving for the hypotenuse (XY) so we isolate the x by dividing sin(45) on both sides leaving you with:
x = 5/sin(45)
Plug this into your calculator and you should have 5 square root 2 as your answer.