"Square has sides of length 1. Points and are on and , respectively, so that is equilateral. A square with vertex has sides that are parallel to those of and a vertex on . The length of a side of this smaller square is , where , , and are positive integers and is not divisible by the square of any prime. Find ."

I've tried to draw my version of this diagram, but I'm not so good at paint, so I'll try to do my best in explaining how I interpret this problem.

There is this square with an inscribed equilateral triangle, and a smaller square. Because the smaller square's sides are parallel to that of the larger one, and is a vertex for the smaller square as well as a point on , then I get the following equalities.

Let be one side of the smaller square and let be one side of the inscribed triangle. Then it follows that:

(1)

(2)

Equating these two expressions and solving for , I get that , which is incorrect. Thoughts?