How can I find the diameter of a circle that's been rolled up to a wall when the circle is touching a rectangle in the corner of the wall with height $8$ and width $5$?
Here's a picture of what I mean:
I tried drawing a right triangles in several different areas, but none of them helped me out. I'm pretty sure that's the right approach, but I still can't figure out this problem.



Let the tangents be the coordinate axes and hence the intersection point be the origin.
You get the equation of circle as $$(x-r)^2+(y-r)^2=r^2$$ This circle passes through $(5,8)$. You can find $r$ by these information.
Alternate method:
Use Pythagoras theorem.