Are you sure of the wording of this problem?
A circle of radius r, you want to cut out a slice from the middle
(like cutting a piece of pie) that makes 0 < θ < 2π, and has perimeter P.
Maximize the area of this slice.
If the radius r is given and the perimeter P is given,
. . the area of the sector is determined; it is a constant.
In fact: .A .= .½r(P - 2r)