I want to solve the differential equation$$\begin{cases}x''=\frac{2x}{x^2-1}\\x'(0)=0\\x(0)=x_0\end{cases}$$
This is what I have done so far. I have not studied differential equation much, and introducing the function $s$ below is just a trick that I learned, but I'm not sure why/if it works.
Let $s:=x'$. Then $$\frac{d^2x}{dt^2}=\frac{ds}{dt}=\frac{ds}{dx}\frac{dx}{dt}=\frac{ds}{dx}s$$ so the above equation becomes $$s\frac{ds}{dx}=\frac{2x}{x^2-1}$$ $$s\,ds=\frac{2x}{x^2-1}\,dx$$$$\int s\,ds=\int\frac{2x}{x^2-1}\,dx+C$$ $$s^2=\log\lvert x^2-1\rvert+C$$$$x'=\omega\sqrt{\log\lvert x^2-1\rvert+C},\,\omega:\mathbb R_+\mapsto\{-1,1\}$$ and with $x'(0)=0$, $x(0)=x_0$ we have $$x'=\omega\sqrt{\log\bigg\lvert\frac{x^2-1}{x_0^2-1}\bigg\rvert}$$ How can I continue to solve for $x(t)$? And am I justified in introducing $s$ and treat the notation like I did to obtain $x'$?
Your calculus is correct. $$\frac{dx}{dt}=\omega\sqrt{\ln\bigg\lvert\frac{x^2-1}{x_0^2-1}\bigg\rvert}$$ with $\omega=\pm 1$ . $$t=\pm\int \frac{dx}{\sqrt{\ln\bigg\lvert\frac{x^2-1}{x_0^2-1}\bigg\rvert}}$$ With condition $x(0)=x_0$ : $$t=\int_{x_0}^x \frac{d\xi}{\sqrt{\ln\bigg\lvert\frac{\xi^2-1}{x_0^2-1}\bigg\rvert}}$$ One can show that the integral is convergent for $\xi\to x_0$. That isn't the main trouble.
The integral cannot be expressed in terms of standard functions, a fortiori the inverse function $x(t)$ as well. Numerical calculus is required to fully solve the problem.