We can search for a solution via the Laplace transform. The inverse laplace transform is what is going to be cumbersome, and I believe we might be able to extract a series solution of sorts from it.
We would have
$$s^2 U(x,s) - su(x,0)-u_t(x,0) = k^2 \partial_{xx}U(x,s)$$
Which leads to the Boundary Value Problem in $x$,
$$\begin{cases}
k^2 U''(x,s) - s^2(x,s) = 0 \\
U(0,s)=0 \\
U(L,s)=A\displaystyle\frac{\omega}{\omega^2 + s^2}
\end{cases}$$
This has the solution $$U(x,s) = A\left(\frac{\omega}{\omega^2 + s^2}\right)\text{csch}{\left(\frac{Ls}{k}\right)}\text{sinh}{\left(\frac{sx}{k}\right)}$$
and so,
$$u(x,t) = \frac{1}{2 \pi i}\int_{\gamma - i\infty}^{\gamma + i\infty}U(x,s)e^{st}\,ds$$
In order to do this, consider the integral
$$\int_{\Gamma}U(x,z)e^{zt}\,dz$$
Where $\Gamma$ is the contour taken from the vertical line $x=c$, connected to a circular contour with radius $R$ in the first quadrant going around and connecting back to $x=c$ in the fourth quadrant.
Since our integral is made up of exponentials, it's easy to bound and show that it vanishes as $R\rightarrow \infty$ (I avoided this computation, but it would be nice if someone could verify my suspicion.). Further, we have simple poles at $z = \pm i \omega$ and $z=\frac{kn\pi i}{L}$ for $n \in \mathbb{Z}$. There is no pole at $z=0$ as it is a removable singularity.
Thus,
$$u(x,t) = \text{Res}(U(x,z)e^{z t},i\omega) +\text{Res}(U(x,z)e^{z t},-i\omega) +\sum_{n\in \mathbb{Z}}\text{Res}(U(x,z)e^{z t},\frac{k n \pi i}{L}) $$
To which we have the following from the residues:
$\text{Res}(U(x,z)e^{z t},i\omega) = \frac{1}{2 \pi i}(A e^{i t \omega} \csc{\frac{L \omega}{k}}\sin{\frac{\omega x}{k}})$
$\text{Res}(U(x,z)e^{z t},-i\omega) = -\frac{1}{2 \pi i}(A e^{-i t \omega} \csc{\frac{L \omega}{k}}\sin{\frac{\omega x}{k}})$
$\sum_{n\in \mathbb{Z}}\text{Res}(U(x,z)e^{z t},\frac{k n \pi i}{L}) = \frac{AkL\omega}{i} \sum_{n \in \mathbb{Z}} \left(\frac{(-1)^n}{(kn\pi)^2-(L\omega)^2} \right)\sin{\frac{n \pi x}{L}}e^{\frac{k n t \pi i}{L}}$
So that
$u(x,t) = A\csc{\left(\frac{L\omega}{k}\right)}\sin{(t\omega)}\sin{\left(\frac{\omega x}{k}\right)} + \frac{AkL\omega}{i}\sum_{n\in \mathbb{Z}}\left(\frac{(-1)^n}{(kn\pi)^2-(L\omega)^2} \right)\sin{\left(\frac{n \pi x}{L}\right)}e^{\left(\frac{k n t \pi i}{L}\right)}$
Now, noticing the summation in the index actually simplifies..we get
$u(x,t) = A\csc{\left(\frac{L\omega}{k}\right)}\sin{(t\omega)}\sin{\left(\frac{\omega x}{k}\right)} + 2AkL\omega\sum_{n=1}^{\infty}\left(\frac{(-1)^n}{(kn\pi)^2-(L\omega)^2} \right)\sin{\left(\frac{n \pi x}{L}\right)}\sin{\left(\frac{k t n \pi}{L}\right)}$
Here's a gif of the string in action for $A=L=k=\omega=1$
Best Answer
ahhhh, I believe understand now. The solution requires that $X(0) = X(L) = 0$. This requires a function of period $2L$. The only solution is then a set of sine waves that have periodicity such that $sin(f(L)) = 0$ for some function of L, it then follows that $f(L) = {n\pi x \over L} for\:n \in \Bbb N$. This gives us a set of values that $\lambda$ can then take, we can then put this set of values in to solve for $T(t)$ and $X(x)$.