I am having some issues with these problems.

1. A farmer constructing a rectangluar fenced area with 420 meters of fencing. Calculate the dimensions that will yield the maximum area?

2. The sum of the base and height measures of a triangle is 15cm. What base height will generate the maximum area of the triangle?

I am not understanding how you begin to write the formula that allows to to get to the complete the square stage.