If the area is 800 m2, then l · w = 800 (l = length; w = width)
If the perimeter is 120 m, the 2l + 2w = 120
2l + 2w = 120 ---> l + w = 60 (divide both sides by 2)
l · w = 800 ---> w = 800 / l (divide both sides by l)
Combining: l + w = 60 and w = 800 / l ---> l + 800 / l = 60
Multiplying both sides by l: l2 + 800 = 60l
Rearranging: l2 - 60l + 800 = 0
Factoring: (l - 40)(l - 20) = 0
Solving: either l = 40 or l = 20
If l = 40, then w = 20; if l = 20, then w = 40.
Either way, the dimensions are 20m by 40m.