Reversing the divisibility of 2 out of 3 formula I was looking into a couple of exercises:
First exercise:

Prove that if $x \mid (x^2 + 1)$ the $x = 1$ or $x = -1$

My solution was that if $x \mid (x^2 + 1)$ this means that $x | x^2$ and $x | 1$. The only number that is a divisor of $1$ is 1/-1. Hence $x = 1$ or $x = -1$
Second exercise:

Prove that if $6 \mid (x^3 - x)$ for every integer $x$ (hint among $3$ consecutive integers, one must be a multiple of $3$

Now for the second exercise I started with the same approach i.e. that if $6 \mid (x^3 - x)$ then $6 \mid x^3$ and $6 \mid x$ and then I realized that the question is about to prove that it holds for all integers which is not obvious to me that it does. So I plugged in some value e.g. for $x = 7$ we have $7^3 - 7 = 343 - 7 = 336$ which is a multiple of $6$. Also for $x = 5$ we have $5^3 - 5 = 125 - 5 = 120$ again is multiple of $6$.
So the $6 \mid (x^3 - x)$ seems to hold but I notice that for $x = 7$ we indeed have $6 \mid (7^3 - 7)$ but it is not the case that $6 \mid 7$.
So I have two questions here:
a) Is it wrong to consider that if $x | (a + b)$ then $x | a$ and $x | b$? Or are there specific conditions that this formula holds? Does that mean that my solution to the first exercise is wrong?
b) how can I use the hint to solve the exercise? It is not clear to me
 A: The given hint almost gives away the whole proof for the second exercise. This is because $$x^3 - x = x (x^2 - 1) = x (x - 1) (x + 1).$$
Can you conclude from this that $6 \mid (x^3 - x)$?
A: As mentioned by shoteyes in the comments, if $x \mid (a + b)$ and either $x \mid a$ or $x \mid b$, then $x$ divides both $a$ and $b$.
In the first exercise, since it is known that $x \mid x^2$ and it is given that $x \mid (x^2 + 1)$, $x \mid 1$. Therefore, the only values of $x$ for $x \mid 1$ to be true are $-1$ and $1$. Your solution to the first exercise is correct, though the way it was shown was not made entirely clear. It would be best to mention the specific conditions for $x \mid a$ and $x \mid b$ to be true.
In the second exercise, even though it is known that $6 \mid (x^3 - x)$, it does not hold true for $6 \mid x^3$ nor $6 \mid x$ for every integer of $x$.
However, it might be helpful to factorise $x^3 - x$, as follows:
$$x^3 - x = x(x^2 - 1) = x(x - 1)(x + 1) = (x - 1) \cdot x \cdot (x + 1)$$
Since $x$ is an integer, $(x - 1)$, $x$ and $(x + 1)$ are consecutive integers. Therefore, by using the hint given in the question, one of the integers must be divisible by $3$ (take any $3$ consecutive integers and you will find that one will be divisible by $3$). Moreover, since $(x - 1)$, $x$ and $(x + 1)$ are consecutive integers, at least one of the integers must be divisible by $2$. Thus, since there is at least one integer which is divisible by $2$ and one integer which is divisible by $3$, $x(x - 1)(x + 1)$ must be divisible by $6$.
I hope that helps!
