So, x+y = 2 means y = 2-x, so Q(x) = x^2*(2-x). x>0 and y>0 means 0<x<2.

Q(0) = 0, Q(2) = 0 (Q(0<x<2) > 0, so it has at least one maximum here)

To find a maximum we ought to find where Q'(x) = 0: Q'(x) = 2x(2-x) + x^2*(-1) = 4x - 2x^2 - x^2 = 4x - 3x^2 = x*(4 - 3x) = 0.

x1=0 isn't interesting (considered yet), x2 = 4/3. It is belongs to interval (0; 2), so it is (the only) candidate for the point of extremum. The corresponding y is (2 - 4/3) = 2/3.