The first thing we must do is define variables.
We have then:
x: the length of the side perpendicular to the river
y: the length of the side parallel to the river
The area of the rectangle is given by:
On the other hand, the perimeter of the rectangle is:
From here, we clear the value of y:
Then, rewriting the area we have:
Answer:
the area of the pen as a function of x is: