Let the height of the rectangle be h.

Then the perimeter = 2h+4sqrt(R^2-h^2).

The derivative with respect to h = 2 - 4h/sqrt(R^2-h^2).

Set this equal to 0 and solve for h,

yielding h = R/sqrt(5)

Then the perimeter =

2R/sqrt(5) + 4sqrt(4R^2/5) = 10R/sqrt(5) = 2R*sqrt(5)