I came across this problem on math stack exchange and tried to solve it myself: The position of a ladder leaning against a wall and touching a box under it.
What I did was set up 2 equations
Then by similar triangles:
I took $(x+1)^2+(y+1)^2=4^2$ then solved for 1+y to get $sqrt(-x^2-2x-15)$
I then plugged this back into the original and got
$x+1/x = 1/(-x^2-2x-15)$
However, my equation gives complex solutions. So where have I gone wrong? How can I get to the right solution using these 2 equations?