No. You can't do this because $\xi$ is a function of $x$. Moreover, when using Big-O notation we must be talking about asymptotic around a point (possibly $\infty$) and that isn't the case here. We say that $f(x) \in O(g(x)) $ (also written as $f(x) =O(g(x)) $) when $\displaystyle\limsup_{x\to a} \left|\frac{f(x)}{g(x)}\right| < \infty$.
On the other hand, around the origin we have that $\log(1+x) = x + O(x^2)$, which can clearly be written as $\log(1+x) = O(x)$. Let $x \to \frac{1}{x}$ and we get your result, at least for all $|x| < 1$
Also, note that the two instances of $\xi$ are not the same. In the first case we have
$$\log(1+x) = \frac{x}{1+\xi} \implies \xi = \frac{x}{\log(1+x)}-1$$
And in the second case we have
$$\log(1+1/x) = \frac{1/x}{1+\xi}\implies \xi=\frac{1}{x\log(1+1/x)}-1$$