HINT: You didn’t say, but I assume that $x$ is the length of the common side. Make a sketch. (That should almost always be your first step in a problem of this general type.)
| y | y |
| | |
| | | x
| | |
There are $3$ fences of length $x$. If $y$ is the other dimension of each of the rectangles, there are $4$ fences of length $y$ (or two of length $2y$, if you prefer). Clearly you should use all $840$ feet of the available fencing, so $3x+4y=840$, and you can express $y$ in terms of $x$. Equally clearly $A(x)=2xy$, and once you’ve expressed $y$ in terms of $x$, you can rewrite $A(x)$ as a function of $x$ alone.
After you’ve done that, go through the usual routine to find a maximum of $A(x)$: find the derivative $A'(x)$, set it to $0$, solve for $x$, and check that you’ve actually found a maximum. Then substitute that value of $x$ back into $A(x)$ to find the actual maximum area.