What method can be used for solving this fokker Planck equation and how? Let's have this equation:
\begin{equation}
\frac{\partial p(x,t)}{\partial t} = - a \frac{\partial p(x,t)}{\partial x} + \frac{1}{2} b \frac{\partial^2 p(x,t)}{\partial x^2}
\end{equation}

a and b are constant and $0&lt;x&lt;L$.

boundary conditions 
\begin{equation}
p(0,t)= f(t) \qquad 
p(L,t)= g(t)
\end{equation}

I need to know which method can work? I have no idea how to deal with this boundary value problem 

Many thanks for your help in advance
Your PDE is second order linear parabolic and homogeneous PDE which can be written as:

$$ \partial_t p + a \nabla p = D \, \nabla^2 p, \quad p = p(x,t), \quad 0&lt;x&lt;L, \quad t &gt;0,$$ 

where $a$ and $D = b/2$ are constants. Since you have a bounded domain on $x$ and your equation is linear, separation of variables can do the trick here. Assume you are given an initial condition such that $p(x,0) = p_0(x)$ and you define the non-dimensional variable $\xi = x/L$ (you can do the same with $t$ and $p$) so you have:

$$\partial_t p + k \partial_\xi p = \alpha \partial_{\xi}^2p, \quad p = p(\xi,t), \quad 0  &lt; \xi &lt; 1, \quad t &gt; 0, \tag{1} $$ with $\alpha = D/L^2$, $p(0,t) = f(t), \ p(1,t) = g(t)$ and $p(\xi,0) = p_0(L \xi) \equiv \tilde{p}_0(\xi)$. We cannot proceed further with separation of variables because of the inhomogenous boundary conditions, so we have to make use of the superposition principle defining:

$$p = u+v,$$

where $u$ satisfies homogenous boundary conditions and $v$ is the simplest function that satisfies $v(0,t) = f(t)$ and $v(1,t) = g(t)$. Set $v(x,t) = A(t) x+ B(t)$ and solve for $A$ and $B$. Write the problem for $u$:

$$\partial_t u + k \partial_\xi u  = \alpha \partial_\xi^2 u \underbrace{ -\partial_tv-k\partial_\xi v + \alpha\partial^2_\xi v}_{W(x,t)}, \tag{2}$$ the known term $W$ makes your equation for $u$ non-homogenous so you must solve the following new problem, which I create (Fredholm's alternative):

$$ \theta_t + k \theta_x = \alpha \theta_{xx}, $$

together with $\theta(0,t) = \theta(1,t) = 0$ and I don't care about the initial conditions (which for $u$ turn to be $u(x,0) = p(x,0)-v(x,0)$).

Set now: 

$$\theta(\xi,t) = P(\xi)Q(t), \quad P \neq 0, \ Q \neq 0$$ and substitute back in the PDE for $\theta$ to have:

$$PQ' + k P' Q = \alpha P'' \implies \frac{Q'}{Q} = \frac{\alpha P'' - k P'}{P} = \lambda \in \mathbb{R}^- \cup \{0\} \mathbb{R}^+. \tag{3} $$

Eq. $(3)$ yields to two different problems for $P$ and $Q$. Solve for $P$ and find the so-called eigenfunctions and eigenfunctions associated to the homogenous Dirichlet boundary conditions $P(0) = P(1) = 0$. Expand then the solution $u$ in terms of the eigenfunctions (Sturm-Liouville theory): 

$$u = \sum^\infty_{n} Q_n(t) P_n(x),$$ and find the Fourier coefficients $Q_n(t)$ by introducing this in eq. $(2)$ and making use of the property of orthogonality of $P_n(x)$, i.e.,

$$ \int^1_0 P_n(x) P_m(x) r(x) \, \mathrm{d} x = \delta_{nm}, $$ where $\delta$ is the Kronecker delta and $r(x)$ is the weight function of the self-adjoint problem for $P$ (which is $r(x) = 1$ here).

Hope you find this helpful. Cheers!
Is Eq 3 correct?

There is a 'constructive' solution to this where you in-cooperate elements of physics. Use de Broglie's theory and Kac-Moody algebra.