$$u_x+u_y=e^{x+2y} \tag 1$$
Of course it is easy to solve the problem thanks to the method of characteristics. But you can also solve it (in this case) with separation of variables.
In fact what you done wrong is to apply the separation of variables directly to the PDE, which is non-homogeneous, before reducing it to an homogeneous PDE.
First find a convenient particular solution. That is what you did. You found :
$$u_p(x,y)=\frac{1}{3}e^{x}e^{2y}$$
Then change of function $u=v+u_p$ :
$$u(x,y)=v(x,y)+\frac{1}{3}e^{x}e^{2y}$$
The PDE is transformed into :
$$v_x+v_y=0 \tag 2$$
The separation of variables with $v(x,y)=X(x)Y(y)$ leads to
$$X'Y+Y'X=0 \quad\implies\quad \frac{X'}{X}=-\frac{Y'}{Y}=\lambda=\text{constant}$$
$$X(x)=c_1e^{\lambda x}\quad\text{and}\quad Y(y)=c_2e^{-\lambda y}$$
$$v(x,y)=c \: e^{\lambda x}e^{-\lambda y}$$
$$u(x,y)=c \: e^{\lambda x}e^{-\lambda y}+\frac{1}{3}e^{x}e^{2y} \tag 3$$
Condition :
$$u(x,0)=0=c \: e^{\lambda x}e^{0}+\frac{1}{3}e^{x}e^{0} \quad\implies\quad \lambda=1\quad\text{and}\quad c=-\frac13$$
Puting them into Eq.3 leads to the solution :
$$u(x,y)=-\frac13 \: e^{ x-y}+\frac{1}{3}e^{x+2y}$$