A farmer has 4 km of fencing wire and wishes to fence a rectangular piece of land through which flows a straight river, which is to be utilised as one side of the enclosure. How can this be done to enclose as much land as possible?

The actual answer is:2 km x 1km = maximum of 2kmbut I keep getting 1km and 1km^{2}