Answer
$x=S/2$ and $y=S/2$
Work Step by Step
We maximize $ ¥$,
Where $ ¥ = xy$
We maximize $ ¥$ by plugging in $S-x = y$.
$ ¥ = x* (S-x) = Sx-x^2$
Taking the derivative (with respect to x),
$ ¥' = S-2x$ and $ ¥'' = -2$ (showing this is a max)
The max is where the is derivative is zero or $x=S/2$ and $y=S/2$ by back substitution.