Your string is cut into X and (24-X). Suppose the X part is used to form the circle, and the (24-X) part is used to form the square. Then since the circumference X = 2ðr, the radius r of the circle is X/(2ð), and so the area is ðr² = ðX²/(4ð²) = X²/(4ð).
The area of the square is just the square of one side, and one side is (24-X)/4 = 6 - X/4, so the area is (6 - X/4)².
So the sum of the areas is just X²/(4ð) + (6 - X/4)². You want to minimize this, so differentiate it with respect to X, and set the derivative to zero:
f'(X) = X/(2ð) - (6 - X/4)/2 = 0, so X/ð - 6 + X/4 = 0, so X = 6 / (1/4 + 1/ð).
Note that we don't know if this is a minimum or a maximum yet, so you'll need to work out what the area would have been if all the string had been used to create the circle, and then work out what the area would have been if all the string had been used to create the square. You should find that the above answer is less than either of them. However I strongly recommend you also check my math above: if I've got it right this is rather a messy one.
(That funny symbol ð should be a pi, by the way: it isn't being interpreted correctly.)
thank you David Q