1,000 feet of fencing is going to be cut into two pieces. One of the pieces will be used to enclose a square playground and the other will be to enclose an equilateral triangle playground. What should be the dimensions of the two playgrounds to maximize the area the kids have to play?

I have this so far:

A_{triangle}= 3^{1/2}/4 * L^{2 }A_{Square}= X^{2 }4X + 3L = 1000

Now I'm stuck; I do not know what to do. I'm very confused on how those two shapes sides can relate to one-another.