Because there are two adjacent rectangular corrals, we need for perimeter to be such that $$P = 3x+2y = 480\iff 2y = 480 - 3x \iff y = 240 - \frac 32 x$$
Where $3x$ counts the three sides, one of which is shared by each rectangle.
Then Area is $x y$...$y$ being the width across the large rectangle, and $x$ being the length of the large rectangle containing the adjacent rectangles.
$$A = xy = x\left(240 - \frac 32 x\right) = 240 x - \frac 32 x^2$$
Now find $A'(x)$ and set that equal to $0$ and solve for maximum $x$.
$$A'(x) = 240 - 3x = 0 \iff 3x = 240 \iff x = 80\;\text{feet}$$
$$y = 240 - \frac 32 x = 240 - 120 = 120\;\text{feet}$$
So the large rectangle will be 120 feet across top and bottom, and 80 feet along each side: Two outer sides, one inner (middle/dividing) side.