start with the circle its perimetre is X then X=2pi*R then R=X/2pi

Area of the circle is = pi*R^2 = (pi * X^2 )/(4pi^2) = X^2/(4pi)

now the rectangle : we have 18-X perimetre of the rectangle its perimetre = 2L+2W and we have L=2W => 18-X=6W => W=3-X/6 and L = 2W = 6-X/3

=> Area of the rectangle is = W*L = ( 3-X/6 ) ( 6-X/3 )

Total Area = ( 3-X/6 ) ( 6-X/3 ) + X^2/(4pi)