as the 2 rectangles are similar the corresponding sides are in the same ratio
so AB/YX = AD / YB
AB = x and AD =1 Also YX = 1 and YB = x - 1
so we have
x = 1 (x - 1)
x(x - 1) = 1
x^2 - x - 1 = 0
Solve this using the quadratic formula (or by completing the square) and you#ll get the golden ratio