The question is: Let $Y_1 < Y_2$ be the order statistics of a random sample of size $2$ from a distribution of the continuous type which has p.d.f $f(x)>0$ provided $x \geq 0$, and $0$ elsewhere. Show that the independence of $Z_1 = Y_1$ and $Z_2=Y_2-Y_1$ characterizes the exponential distribution.
This is as far as I went: The joint distribution of the order statistics : $$f(y_1,y_2)=2f(y_1)f(y_2), 0 < y_1 < y_2$$.
The Jacobian of change of variable is $1$, thus $$g(z_1,z_2)=f(z_1,z_1+z_2)=2f(z_1)f(z_1+z_2)$$.
$Z_1$ and $Z_2$ are independent if and only if $$g(z_1,z_2)=g(z_1)g(z_2)$$ Not sure how to continue, can anyone please help?
Edit: I found a similar question: Independence of spacing of order statistics of exponential distribution My question is just the reverse of the problem.
Small corrections to your work so far (being clear about the domains of the densities):
Showing that $f(z_1+z_2)$ factorizes.
We have $$g_{Z_1}(z_1) = \int_0^\infty g_{Z_1, Z_2}(z_1, u) \, du = 2 f(z_1) \int_0^\infty f(z_1+ u) \, du, \qquad \forall z_1 \ge 0,$$ but by independence we also have $$g_{Z_1}(z_1) g_{Z_2}(z_2) = g_{Z_1, Z_2}(z_1, z_2), \qquad \forall z_1, z_2 \ge 0$$ as you noted. Combining these two leads to $$g_{Z_2}(z_2)\int_{0}^\infty f(z_1 + u) \, du = f(z_1 + z_2), \qquad \forall z_1, z_2 \ge 0.$$
In particular, there exist functions $h_1, h_2$ such that $$f(z_1 + z_2) = h_1(z_1) h_2(z_2), \quad \forall z_1, z_2 \ge 0.$$
Exploiting the fact that $f(z_1+z_2)$ factorizes to determine the functional form of $f$.
We have $f(z) = h_1(0) h_2(z) = h_1(z) h_2(0)$ for all $z \ge 0$, so $f$, $h_1$, and $h_2$ are the same up to a multiplicative constant. In particular, if we define $\tilde{f}(z) = f(z)/f(0)$, we have the functional equation $$\tilde{f}(z_1 + z_2) = \tilde{f}(z_1) \tilde{f}(z_2), \qquad \forall z_1, z_2 \ge 0,$$ which can be shown to have solution $\tilde{f}(z) = e^{cz}$ assuming $\tilde{f}$ is continuous. So, $f(z) = ae^{cz}$ for some constants $a$ and $c$. Since $f$ is a density on $[0, \infty)$, this narrows it down to the exponential distributions.