Use the $f(x,y)$ that you defined. The region $0\leq x \leq 1, 0 \leq y \leq 1$ is closed and bounded so the only places you need to consider are the boundary of the region and any critical points on the inside (which most satisfy $f_x = 0$ and $f_y = 0$ and where $f_x = \frac{\partial f}{\partial x}$. With equations $f_x = 2xy-y^2=y(2x-y)=0$ and $f_y = x^2-2xy=x(x-2y)=0$, the only critical point is $(0,0)$ which is on the boundary. So we need only consider the boundary lines of $x=0, y=0, x=1, y=1$. Clearly if $x=0$ or $y=0$ the function is 0 so those can't be the max. $f(x,1) = x^2-x$ which has max at $x=-\frac{1}{2}$ which is not in an region. That leaves $f(1,y) = y-y^2$. This has max at $y=\frac{1}{2}$. Since we only have to check $(1,\frac{1}{2})$ and $f(1,\frac{1}{2}) > 0$, it is the max.