You try to take the derivative of x1 with respect to x2. You cannot meaningfully take the derivative of a function with respect to a different function.
If you try to define x1 as a function of x2 then you are going to end up with a function of more than one variable, which would be a PDE rather than an ODE.