I'm trying to figure out the length of a side of a square:

I tried to work it out this way:A square is inscribed in a circle of radius r. Express the length of the side of the square in terms of r.

since the the lines insribed on the insides of a square are right angles right?

but the answer says r doesn't = x so what am I doing wrong here and how can I get the right answer?