Question 901507
Let x be the side length of the square garden.


Perimeter is {{{4x}}}.
Area is {{{x^2}}}.


Fence cost, {{{4x*4=16x}}} dollars
Soil preparation cost, {{{(x^2)(0.80)}}} dollars


Total cost wanted is $640;
{{{0.8x^2+16x=640}}}


Possible simplification:
{{{highlight(x^2+20x-800=0)}}}
Using this equation, first find discriminant:
{{{20^2+4*800=400+3200=3600=(6*10)^2=60^2}}}.
Discriminant is {{{60^2}}}.


{{{x=(-20+sqrt(60^2))/2}}}
{{{x=(-20+60)/2}}}
{{{highlight(x=20)}}}
(The quadratic equation is factorable, and that could be done if desired).


ANSWER CONCLUSION:  Garden side length, 20 feet, and area 400 square feet.