My rationale was the following. If $n$ is even, then
$$n \mid x - a \implies n \mid x - a - n \implies n \mid \frac{1}{2} (x - a - n) \implies 2n \mid x - a - n $$
so $x \equiv a + n \pmod{2n}$. On the other hand, if $n$ is odd, $(n:2)=1$. Hence the Chinese remainder theorem guarantees that the linear congruence system
$$\begin{cases} x \equiv a \pmod{n} \\ x \equiv a \pmod{2} \end{cases}$$
has a unique solution modulo $2n$. We know the solution is $x \equiv a(2+n) \mod{2n}$, which is congruent to $n \equiv a(2 - n) \pmod{2n}$.
Given that $n$ is odd, $(2+n:2-n)=1$. Therefore $x \equiv a \pmod{2n}$.
Is this more or less correct?
I don't quite see what you are doing. Let $$ x-a = tn \; . $$
If $t$ is even, let $t = 2 s,$ so $$ x-a = s(2n) $$ so $$x \equiv a \pmod {2n}$$
If $t$ is odd, write $t = 2r + 1,$ so $$ x-a = tn = (2r+1)n = 2rn + n \; , $$ $$ x-a = r(2n) + n, $$ $$ x= a + n + r (2n) $$ $$x \equiv a +n \pmod {2n}$$