I'm not quite clear from your pic if x is the radius or diamter of the circular part--I'll proceed assuming it is the radius

P = 3sides of a rectangle + 1/2 circumference

1) P = (2x + 2 y) + pi x = 28

2) A = 2xy +1/2 pi x^2

Solve 1) for y y = (28 - 2x -pi x)/2

Now plug this into 2)