Checking a result obtained by Chinese Remainder Theorem I have the following two linear congruences:
$$x \equiv 3 + n\mod p_1 $$
$$x \equiv 3 - n\mod p_2$$
where $p_1$ and $p_2$ are distinct primes, and $n$ is the difference between those primes.
Does it follow that:
$$x \equiv -2n \mod p_1p_2$$
My Derivation
$ x = p_1.j + 3 + n$ 
$p_1.j + 3 + n \equiv 3 - n \mod p_2$ 
$p_1.j  \equiv  - 2n \mod p_2$ 
$j \equiv -\frac{2n}{p_1} \mod p_2$ 
$ j = p_2.k -\frac{2n}{p_1} $ 
$x = p_1(p_2.k -\frac{2n}{p_1})$
$x = p_1p_2k-2n$
$x \equiv -2n \mod p_1p_2$
Is the derivation okay?
The only expression I'm not 100% sure about is $j \equiv -\frac{2n}{p_1} \mod p_2$ because $\frac{2n}{p_1}$ wouldn't be an integer under normal division and I've forgotten how modular division works.  
 A: You made a few basic mistakes. First, note you have
$$ x = p_1.j + 3 + n \tag{1}\label{eq1A}$$
From
$$j = p_2.k -\frac{2n}{p_1} \tag{2}\label{eq2A}$$
you then state that
$$x = p_1(p_2.k -\frac{2n}{p_1}) \tag{3}\label{eq3A}$$
You just replaced $j$ in the first equation, but forgot account for the $3 + n$ terms. When you include those, you would then get
$$x = p_1 p_2 k - n + 3 \tag{4}\label{eq4A}$$
A second mistake is that, as you mention, you are dividing $2n$ by $p_1$. You can do this, but then $k$ will not be an integer if $\frac{2n}{p_1}$ is not an integer. Thus, when you are no longer dealing with integers, any result would not necessarily be valid if you then tried to apply it to integers, as you do at the end with your modulo result of
$$x \equiv -2n \mod p_1p_2 \tag{5}\label{eq5A}$$
since, even when adjusting $-2n$ to be $3 - n$, it's only true if $k$ is an integer.
Instead, from your earlier result of
$$p_1.j  \equiv  - 2n \mod p_2 \tag{6}\label{eq6A}$$
you can just say something like
$$p_1 j = p_2 k - 2n \mod p_2 \tag{7}\label{eq7A}$$
Substituting this back into \eqref{eq1A} just gives
$$x = p_2 k - 2n + 3 - n = p_2 k - n + 3 \tag{8}\label{eq8A}$$
which is just a restatement of your second modulo equation of $x \equiv 3 - n\mod p_2$.
To solve the $2$ modulo equations to determine $x$ for some given $n, p_1$ and $p_2$, you can use the Chinese Remainder Theorem (e.g., as described in How can I solve a problem using the Chinese remainder theorem and how does mod operator is understood correctly? for $3$ equivalent modulo equations).
