Hello, Vicky!

I couldn't follow your work, but it looks reasonable.

Through a point on the hypotenuse of a right triangle,

lines are drawn parallel to the legs of the triangle so that the triangle

is divided into a square with two smaller right triangles.

The area of one of the two small right triangle is m times the area of the square.

The ratio of the area of the other small right triangle to the area of the square is

. . Code:

- *
|::*
b |:::::*
|:::A2:::*
- *-----------*
| x |::*
| |:::::*
x | S x |::::::::*
| |:::::A1::::*
| | :::::::::::::*
- *-----------*-----------------*
: x : a :

The side of the square is

. . Its area is: .

The area of is: .

We are told: . .[1]

The area of is: . .[2]

From the similar right triangles: .

Substitute into [2]: .

The ratio of to is: .

Substitute [1]: .