The total area of the figure (let w be the width of the rectangle and diameter of the semicircle and h be the height of the rectangle)
A = (1/2)(π(w/2)2) + hw = (1/8)πw2 + hw
The perimeter of the body is constrained to 10 meters:
P = π(w/2) + w + 2h = 10
Use the constraint to put h in terms of w: h = 1/2 (10-w-πw/2) = 5-w/2-πw/4
Substitute into A expression to get A(w)
A = (1/8)πw2 + w(5 - w/2 - πw/4)
Set dA/dw = 0
πw/4 + 5 - w - πw/2 = 0
Solve for w, h, A.