If you are not familiar with the Pythagorean theorem, I will write it below to remind you for your future mathmatical endeavours:

c is the hypotenuse, and a and b are the other two sides. The hypotenuse is the largest side of a triangle. In this example, a and b are equal to each other and c is equal to 2, so I'm going to convert b into a and do some math trickery here:


Basically, I swapped b with a and combined like terms. Then I just replaced c with 2, then squared it into 4.
All you have to do now is solve for a
Step 1 is to divide both sides by 2 to get:

Then just square both sides:

Now you know that the length of the sides are equal to the square root of 2.
Sorry if this was a bit rushed, I hate running out of time on these. If you have any questions on why I did something, ask away in the comments.