Assume that $ab \mid (a+b)^2.$ Show that $ab \mid (a-b)^2$. 
Assume that $ab \mid (a+b)^2.$ Show that $ab \mid (a-b)^2$.

If $ab \mid (a+b)^²$, then $ab\mid a^2+2ab+b^2 \Longrightarrow ab\mid a^2, ab\mid 2ab$ and $ab\mid b^2$ right?
So since $(a-b)^2 = a^2-2ab+b^2$ from the assumption we have that $ab \mid a^2$ and $ab \mid b^2$. Now only remains to show that $ab \mid -2ab$ which is clearly true.
Is this valid? I'm not sure about the implication that $ab$ would divide all the terms in $a^2+2ab+b^2$.
 A: Not quite: in general, for $a,b,c\in\mathbb{Z}$, $a|b+c$ does not imply $a|b$ and $a|c$.
Instead, simply suppose $ab|a^2+2ab+b^2$. That is, $abk=a^2+2ab+b^2$ for some $k\in\mathbb{Z}$. The rest sort of follows like the end of your idea, if you subtract $4ab$ from both sides of the equation, then $abk-4ab=a^2-2ab+b^2$, so clearly $ab|(a-b)^2$.
A: We have $2 \mid 6=3+3$ but $2 \not \mid 3$, so the fact that if $x \mid y +z$ then $x \mid y$ and $x \mid z$ isn't valid (at least in general).
What you just have to use here is the fact that if
$$
x \mid y \text{ and } x \mid z
$$
therefore
$$
x \mid \lambda y + \mu z.
$$
Here, if $ab \mid (a+b)^2$ and since it's obvious that $ab \mid ab$, we have
$$
ab \mid (a+b)^2 -4ab=(a-b)^2.
$$
By the way, if $ab \mid (a+b)^2$, you can show that $a=b$ (see here).
A: As others have said $x \mid (y+z) \nRightarrow (x \mid y) \land (x \mid z)$
What you can say is $ab \mid (a+b)^2 \iff (a+b)^2 = kab, k \in \mathbb{Z}$
This implies $a^2 + b^2 +2ab = kab \implies a^2 + b^2 = (k-2)ab \implies a^2 + b^2 - 2ab = (k-4)ab \implies (a-b)^2 = (k-4)ab \iff ab \mid (a-b)^2$, as required.
