Since the circle touches both the x-axis and y-axis, and it has radius r, its centre will be (r,r) and its equation (x-r)^2 + (y-r)^2 = r^2 (this is a lot clearer with a diagram). Then we use the perpendicular distance formula from the centre to the tangent, letting the distance equal r. This should give us the radius of the circle, which we substitute into the original equation.