Your approach is that first handle these three B.C.s and I.C.s $y(0,t)=0$ , $\dfrac{\partial y}{\partial x}(l,t)=0$ and $\dfrac{\partial y}{\partial t}(x,0)=0$ . You find that the separation constant is best to take $-\dfrac{(2m+1)^2\pi^2c^2}{4l^2}$ and you get $y(x,t)=\sum\limits_{m=0}^\infty C(m)\sin\dfrac{(2m+1)\pi x}{2l}\cos\dfrac{(2m+1)\pi ct}{2l}$ .
Now you handle the I.C. $y(x,0)=x(2l-x)$ , so you have to face $\sum\limits_{m=0}^\infty C(m)\sin\dfrac{(2m+1)\pi x}{2l}=x(2l-x)$ . But the following should be extremely carefull!
You are facing to find an unusual kernel inversion, so all the calculations should be start from first principle!
Luckily the method in http://tutorial.math.lamar.edu/Classes/DE/FourierSineSeries.aspx still hold in this case.
$\sum\limits_{m=0}^\infty C(m)\sin\dfrac{(2m+1)\pi x}{2l}=x(2l-x)$
$\sum\limits_{m=0}^\infty C(m)\sin\dfrac{(2m+1)\pi x}{2l}\sin\dfrac{(2n+1)\pi x}{2l}=x(2l-x)\sin\dfrac{(2n+1)\pi x}{2l}$
$\int_0^l\sum\limits_{m=0}^\infty C(m)\sin\dfrac{(2m+1)\pi x}{2l}\sin\dfrac{(2n+1)\pi x}{2l}dx=\int_0^lx(2l-x)\sin\dfrac{(2n+1)\pi x}{2l}dx$
$\sum\limits_{m=0}^\infty C(m)\int_0^l\sin\dfrac{(2m+1)\pi x}{2l}\sin\dfrac{(2n+1)\pi x}{2l}dx=\int_0^lx(2l-x)\sin\dfrac{(2n+1)\pi x}{2l}dx$
$\because\int_0^l\sin\dfrac{(2m+1)\pi x}{2l}\sin\dfrac{(2n+1)\pi x}{2l}dx$
$=\int_0^l\dfrac{1}{2}\biggl(\cos\dfrac{(m-n)\pi x}{l}-\cos\dfrac{(m+n+1)\pi x}{l}\biggr)dx$
$=\begin{cases}\biggl[\dfrac{l}{2(m-n)\pi}\sin\dfrac{(m-n)\pi x}{l}-\dfrac{l}{2(m+n+1)\pi}\sin\dfrac{(m+n+1)\pi x}{l}\biggr]_0^l&\text{when}~m\neq n~\text{and}~m+n\neq-1\\\biggl[\dfrac{x}{2}-\dfrac{l}{2(m+n+1)\pi}\sin\dfrac{(m+n+1)\pi x}{l}\biggr]_0^l&\text{when}~m=n\\\biggl[\dfrac{l}{2(m-n)\pi}\sin\dfrac{(m-n)\pi x}{l}-\dfrac{x}{2}\biggr]_0^l&\text{when}~m+n=-1\\\left[0\right]_0^l&\text{when}~m=n~\text{and}~m+n=-1\end{cases}$
$=\begin{cases}0&\text{when}~m~\text{and}~n~\text{are integers and}~m\neq n~\text{and}~m+n\neq-1\\\dfrac{l}{2}&\text{when}~m~\text{and}~n~\text{are integers and}~m=n\\-\dfrac{l}{2}&\text{when}~m~\text{and}~n~\text{are integers and}~m+n=-1\end{cases}$
$\therefore C(n)\dfrac{l}{2}=\int_0^lx(2l-x)\sin\dfrac{(2n+1)\pi x}{2l}dx$
$C(n)=\dfrac{2}{l}\int_0^lx(2l-x)\sin\dfrac{(2n+1)\pi x}{2l}dx$
$C(m)=\dfrac{2}{l}\int_0^lx(2l-x)\sin\dfrac{(2m+1)\pi x}{2l}dx$
From the result of http://integrals.wolfram.com/index.jsp?expr=x%282l-x%29sin%28%28%282m%2B1%29pi+x%29%2F%282l%29%29&random=false,
$\int_0^lx(2l-x)\sin\dfrac{(2m+1)\pi x}{2l}dx=\dfrac{16l^3}{(2m+1)^3\pi^3}$ when $m$ is integer
$\therefore y(x,t)=\sum\limits_{m=0}^\infty\dfrac{32l^2}{(2m+1)^3\pi^3}\sin\dfrac{(2m+1)\pi x}{2l}\cos\dfrac{(2m+1)\pi ct}{2l}$ for $0\leq x\leq l$
To check whether $y(l,t)=l^2-c^2t^2$ for $0\leq ct\leq l$ correct or not, note that you are difficult to simplify $\sum\limits_{m=0}^\infty\dfrac{32l^2}{(2m+1)^3\pi^3}\cos\dfrac{(2m+1)\pi ct}{2l}$ , so you should take the inverse process that consider $\sum\limits_{m=0}^\infty f(m)\cos\dfrac{(2m+1)\pi ct}{2l}=l^2-c^2t^2$ , determine whether $f(m)$ equals to $\dfrac{32l^2}{(2m+1)^3\pi^3}$ or not.
Note that you are facing to find an unusual kernel inversion again, so all the calculations should be again to start from first principle!
Luckily the method in http://tutorial.math.lamar.edu/Classes/DE/FourierCosineSeries.aspx still hold in this case.
$\sum\limits_{m=0}^\infty f(m)\cos\dfrac{(2m+1)\pi ct}{2l}=l^2-c^2t^2$
$\sum\limits_{m=0}^\infty f(m)\cos\dfrac{(2m+1)\pi ct}{2l}\cos\dfrac{(2n+1)\pi ct}{2l}=(l^2-c^2t^2)\cos\dfrac{(2n+1)\pi ct}{2l}$
$\int_0^\frac{l}{c}\sum\limits_{m=0}^\infty f(m)\cos\dfrac{(2m+1)\pi ct}{2l}\cos\dfrac{(2n+1)\pi ct}{2l}dt=\int_0^\frac{l}{c}(l^2-c^2t^2)\cos\dfrac{(2n+1)\pi ct}{2l}dt$
$\sum\limits_{m=0}^\infty f(m)\int_0^\frac{l}{c}\cos\dfrac{(2m+1)\pi ct}{2l}\cos\dfrac{(2n+1)\pi ct}{2l}dt=\int_0^\frac{l}{c}(l^2-c^2t^2)\cos\dfrac{(2n+1)\pi ct}{2l}dt$
$\because\int_0^\frac{l}{c}\cos\dfrac{(2m+1)\pi ct}{2l}\cos\dfrac{(2n+1)\pi ct}{2l}dt$
$=\int_0^\frac{l}{c}\dfrac{1}{2}\biggl(\cos\dfrac{(m-n)\pi ct}{l}+\cos\dfrac{(m+n+1)\pi ct}{l}\biggr)dt$
$=\begin{cases}\biggl[\dfrac{l}{2(m-n)\pi c}\sin\dfrac{(m-n)\pi ct}{l}+\dfrac{l}{2(m+n+1)\pi c}\sin\dfrac{(m+n+1)\pi ct}{l}\biggr]_0^\frac{l}{c}&\text{when}~m\neq n~\text{and}~m+n\neq-1\\\biggl[\dfrac{t}{2}+\dfrac{l}{2(m+n+1)\pi c}\sin\dfrac{(m+n+1)\pi ct}{l}\biggr]_0^\frac{l}{c}&\text{when}~m=n\\\biggl[\dfrac{l}{2(m-n)\pi c}\sin\dfrac{(m-n)\pi ct}{l}+\dfrac{t}{2}\biggr]_0^\frac{l}{c}&\text{when}~m+n=-1\\\left[t\right]_0^\frac{l}{c}&\text{when}~m=n~\text{and}~m+n=-1\end{cases}$
$=\begin{cases}0&\text{when}~m~\text{and}~n~\text{are integers and}~m\neq n~\text{and}~m+n\neq-1\\\dfrac{l}{2c}&\text{when}~m~\text{and}~n~\text{are integers and}~m=n\\\dfrac{l}{2c}&\text{when}~m~\text{and}~n~\text{are integers and}~m+n=-1\end{cases}$
$\therefore f(n)\dfrac{l}{2c}=\int_0^\frac{l}{c}~(l^2-c^2t^2)\cos\dfrac{(2n+1)\pi ct}{2l}dt$
$f(n)=\dfrac{2c}{l}\int_0^\frac{l}{c}~(l^2-c^2t^2)\cos\dfrac{(2n+1)\pi ct}{2l}dt$
$f(m)=\dfrac{2c}{l}\int_0^\frac{l}{c}~(l^2-c^2t^2)\cos\dfrac{(2m+1)\pi ct}{2l}dt$
From the result of http://integrals.wolfram.com/index.jsp?expr=%28l%5E2-c%5E2x%5E2%29cos%28%28%282m%2B1%29pi+cx%29%2F%282l%29%29&random=false,
$\int_0^\frac{l}{c}~(l^2-c^2t^2)\cos\dfrac{(2m+1)\pi ct}{2l}dt=\dfrac{16l^3}{(2m+1)^3\pi^3c}$ when $m$ is integer
$\therefore f(m)=\dfrac{32l^2}{(2m+1)^3\pi^3}=C(m)$
Hence $y(l,t)=l^2-c^2t^2$ for $0\leq ct\leq l$ is correct