A square is inscribed in a right triangle, as shown below. The legs of the triangle are 1 and 3. Find the area of the square.
use similar triangles - x/1-x = 3-x/x, x^2 = 3-4x+x^2, x = 3/4