First method: isosceles triangle
This is a right triangle, so one angle is 90°. The other angle is 45. So, the last angle must be
[tex]180-90-45=45[/tex]
So, the triangle is isosceles, and the legs have the same length, i.e. x=4.
Then, we can find y using either the pythagorean theorem, or the fact that a right isosceles triangle is half a square, and so y is actually the diagonal of the square:
[tex]y=4\sqrt{2}[/tex]
First method: trigonometry
You can use the sine law: it states that the ratio between a side and the sine of its opposite angle is constant. In particular, with right triangles, we have
[tex]\dfrac{y}{\sin(90)}=\dfrac{4}{\sin(45)}\iff y = \dfrac{4}{\frac{1}{\sqrt{2}}}=4\sqrt{2}[/tex]
And similarly
[tex]\dfrac{4}{\sin(45)} = \dfrac{x}{\sin(45)}[/tex]
and trivially deduce again that x=y=4.