Let's consider the PDE
$$
w_t + aw_x - vw_{xx} = 1, \tag{1}
$$
where $a$ and $v$ are constants. To remove the source term, we decompose $w$ as $w(x,t)=\varphi(x,t)+\psi(x)$, where $\psi(x)$ satisfies the ODE
$a\psi'-v\psi''=1$ and the boundary conditions $\psi(0)=\psi(1)=0$. The general solution to the ODE is
$\psi(x)=\frac{x}{a}+c_1+c_2e^{ax/v}$. To determine the coefficients $c_1$ and $c_2$, we apply the boundary conditions, and finally obtain
$$
\psi(x)=\frac{1}{a}\left(x-\frac{e^{ax/v}-1}{e^{a/v}-1}\right). \tag{2}
$$
With this choice of $\psi$, one can easily verify that $\varphi$ must satisfy the homogeneous PDE
$$
\varphi_t + a\varphi_x - v\varphi_{xx} = 0, \tag{3}
$$
subject to the boundary conditions $\varphi(0,t)=\varphi(1,t)=0$ and the initial condition $\varphi(x,0)=-\psi(x)$.
We can solve $(3)$ using the method of separation of variables. Substituting $\varphi(x,t)=F(x)G(t)$ in $(3)$, we obtain
$$
F(x)G'(t)+aF'(x)G(t)-vF''(x)G(t)=0
$$
$$
\implies\frac{G'(t)}{G(t)}=-\lambda=\frac{vF''(x)-aF'(x)}{F(x)}. \tag{4}
$$
The solution to the ODE satisfied by $F$ is given by
$$
F(x)=Ae^{k_+x}+Be^{k_-x}\qquad\left(k_{\pm}=\frac{a\pm\sqrt{a^2-4\lambda v}}{2v}\right). \tag{5}
$$
The boundary conditions $F(0)=F(1)=0$ yield the pair of equations
$A+B=0$ and $Ae^{k_+}+Be^{k_-}=0$, which has nontrivial solution iff
\begin{align}
e^{k_+}=e^{k_-}&\implies e^{k_+-k_-}=1 \implies k_+-k_- = 2n\pi i \\
&\implies \frac{\sqrt{a^2-4\lambda v}}{v} = 2n\pi i \\
&\implies \lambda = \frac{a^2}{4v}+n^2\pi^2v \qquad(n\in\mathbb{N}^{*}). \tag{6}
\end{align}
The eigenfunction $F_n$ corresponding to the eigenvalue $(6)$ is given by
$$
F_n(x)=A_n\exp\left(\frac{ax}{2v}\right)\sin(n\pi x). \tag{7}
$$
In addition, solving the ODE for $G$ --- see Eq. $(4)$ ---, we obtain
$$
G_n(t)=C_ne^{-\lambda_nt}=C_n\exp\left\{-\left(\frac{a^2}{4v}+n^2\pi^2v\right)t \right\}. \tag{8}
$$
Combining $(7)$ and $(8)$ we can write the general solution to the PDE $(3)$ as
$$
\varphi(x,t)=\exp\left(\frac{ax}{2v}-\frac{a^2t}{4v}\right)
\sum_{n=1}^{\infty}a_n e^{-n^2\pi^2vt}\sin(n\pi x). \tag{9}
$$
The coefficients $a_n$ are determined by the initial condition $\varphi(x,0)=-\psi(x)$:
$$
e^{\frac{ax}{2v}}\sum_{n=1}^{\infty}a_n \sin(n\pi x)=-\psi(x)
\implies a_n=-2\int_0^1\psi(x)e^{-\frac{ax}{2v}}\sin(n\pi x)\,dx. \tag{10}
$$
Therefore, the solution to the PDE $(1)$ can be written as $w(x,t)=\varphi(x,t)+\psi(x)$, where $\psi(x)$ is given by $(2)$ and $\varphi(x,t)$ is given by $(9)$ and $(10)$.