How do you work this out?

You can find x by using the pythagorean theorem:
[tex](2x+1)^2+(4x)^2 = (5x)^2[/tex]
[tex]4x^2+4x+1+16x^2=25x^2[/tex]
[tex]20x^2+4x+1 = 25x^2[/tex]
Bring everything to the same side:
[tex]5x^2-4x-1=0[/tex]
The solutions to this equation are [tex]-\dfrac{1}{5}[/tex] and 1. We can't accept the negative solutions because it would lead to negative lengths, so we have [tex]x=1[/tex]
This implies that the triangle is a 3-4-5 triangle. Now, you can use the law of sines to state
[tex]\dfrac{5}{\sin(90)} = \dfrac{4}{\sin(y)} \iff \sin(y) = \dfrac{4}{5} \iff y = \arcsin\left(\dfrac{4}{5}\right)[/tex]