easy ratio question, need help please.

Hey all, I have a easy question that I have found two different answers for (stupid me). Can anyone check my working out and tell me which one is correct. Thanks

The question is to find the value of side x in the rectangle below, the other side being 1. The rectangle is made up of two unit squares and a remaining rectangle that is a scaled down version of the original rectangle.

|-side x--------|

|-----|-----|---|

|-----|-----|---| 1

|-----|-----|---|

1st way: Combining the two unit squares we know that the side lengths of the small rectangle are (x-2) and 1.

|-side x-------|

|----------|---|

|----------|---| 1

|----------|---|

x-2 (meant to be side of small rectangle)

ratio: x/1 = 1/(x-2) we get x= 1+ sqrt(2)

but:

2nd way: Take one unit square away and x becomes (x-1), using the above diagram we get the ratio:

(x-1)/1 = 1/(x-2) and so x= (3 +sqrt(5))/2

I don't know what my error in thinking here is. Can anyone help?

Thanks heaps everyone, this forum is great!