<s>[INST] Find all pairs of integers $(x, y)$ such that $x^3+y^3=(x+y)^2.$ 
Find all pairs of integers $(x, y)$ such that $$x^3+y^3=(x+y)^2.$$

Since $x^3+y^3 = (x+y)(x^2-xy+y^2)$ we get that $$x^2-xy+y^2=x+y$$
this can be expressed as $$x^2-(y-1)x+y^2-y=0.$$
Since we want integers we should probably look at when the discriminant is positive?
$$\Delta = (y-1)^2-4(y^2-y)=-3y^2+6y+1$$
so for $\Delta \geqslant 0$
$$-\frac{2\sqrt3}{3}+1 \leqslant y \leqslant \frac{2\sqrt3}{3}+1$$
only possible solutions are $y=0,1,2.$ However I don't see how this is helpful at all here. What should I do?
 [/INST] The solutions when $x=0,$ $y=0,$ $x=y$ and $x+y=0$ have already
been presented. I give a new argument for the remaining case.
Let $y=-x+t,$ where both $x$ and $t$ are nonzero. With this
substitution, the original equation becomes
$$3x^2-3tx+t^2-t=0\tag1$$
As a polynomial in $x,$ the discriminant for (1) is
$$ D=12t-3t^2=3t(4-t) \tag2$$
If $D=0,$ then $t=4,$ giving the solution $(x,y)=(2,2).$
The integer $D$ is positive iff $1\le t\le3.$
Since $D$ must be a square, it follows from (2) that
$3$ divides $t$ or $4-t.$ Hence, $t$ is $1$ or $3.$
For $t=1,$ (1) gives us $(x,y)=(0,1)\ \text{and}\  (1,0),$ which are not new.
For $t=3,$ (1) implies that $x$ is $1$ or $2,$ giving the solutions
$(1,2)\ \text{and}\  (2,1).$
</s>