Thanks are due to Sanjay Joshi of The Perse School, Cambridge for this solution.

We shall prove that the line AOB always divides the total perimeter into two equal parts, both of length πr, defining r to be the radius of the large semicircle as in the diagram. First consider the case where the line AOB is horizontal. The perimeter of the bottom half (the large semicircle) is πr. Twice the perimeter of each of the small upper semicircles is 2 πr 2 , again πr. Hence when the line AOB is horizontal, the section of the perimeter above the line and the section below the line are of equal length. As the line AOB rotates about O, the lengths of the two sections of the perimeter change to πr+P-Q on one side of the line and πr+Q-P on the other (where P and Q are lengths as defined in the diagram above).
Q=rθ

where θ in this equation is the angle shown in the diagram, measured in radians. Using the property that the angle at the centre of a circle is twice the angle at the circumference subtended by the same arc,
P=2θ( r 2 )=rθ.

It is therefore clear that
P=Q

and that the perimeter length will always be πr.