The solution to this problem is messy, but not difficult.
The perimeter is πr + 2h + 2r = 28
Solve this for h in terms of r: h=(1/2)[28-(π+2)r]
Then A = (1/2)πr2 + (1/2)r[28-(π+2)r]
Differentiate A with respect to r and set that derivative = 0.
Solve for r and then go back to get h.