First, Landau and Lifshitz stated that $ds$ and $ds'$ approach zero simultaneously, so that there is some hidden variable $x$ such that,
\begin{equation}
\lim_{x\to 0} ds(x) =0
\end{equation}
and
\begin{equation}
\lim_{x\to 0} ds'(x) =0,
\end{equation}
assuming and $ds$ and $ds'$ are continuous functions of $x$.
Next, the two are infinitesimals of the same order since the two inertial frames $K$ and $K'$ are equivalent.
The frame $K'$ (in which the interval $ds'$ is measured) moves relative to the frame $K$. Suppose $ds'$ is an infinitesimal of greater order than $ds$, i.e., according the the reference given in the above answer,
\begin{equation}
\lim_{x\to 0} \frac{ds'(x)}{[ds(x)]^n} = A,\quad A\neq 0,\quad n>1,
\end{equation}
where $A$ can depend only on the magnitude of the relative velocity, not its direction and certainly not the coordinates, for reasons related to homogeneity of space and time and isotropy of space.
Since $K$ is also moving relative to $K'$ and the principle of relativity holds, by symmetry one ought to have
\begin{equation}
\lim_{x\to 0} \frac{ds(x)}{[ds'(x)]^n} = A,\quad A\neq 0,\quad n>1,
\end{equation}
which is absurd. Hence $ds$ and $ds'$ have to be infinitesimals of the same order.