$$u(x,t)=f\left(t+\frac{x}{2}\right)+g\left(t-\frac{x}{2}\right)\qquad\text{ is OK.} \tag 1$$
Next you are supposed to determine the functions $f$ and $g$ according to the specified conditions.
First condition : $$\quad u(x,t=0)=0=f\left(0+\frac{x}{2}\right)+g\left(0-\frac{x}{2}\right)$$
$$g\left(-\frac{x}{2}\right)=-f\left(\frac{x}{2}\right)$$
Let $X=-\frac{x}{2} \quad;\quad x=-2X$
$$g(X)=-f\left(\frac{(-2X)}{2}\right)$$
$$g(X)=-f(-X)$$
We put $g(X)$ into equation $(1)$ where $X=t-\frac{x}{2}$
thus $g\left(t-\frac{x}{2})\right)=-f\left(-(t-\frac{x}{2})\right)$
$$u(x,t)=f\left(t+\frac{x}{2}\right)-f\left(-t+\frac{x}{2}\right)$$
We can check that $\quad u(x,0)=f\left(\frac{x}{2}\right)-f\left(\frac{x}{2}\right)=0.\quad$ So, the first condition is satisfied.
Second condition :
$$\frac{\partial u}{\partial t}(x,t=0)=\sin(x)$$
With $\frac{\partial u}{\partial t}(x,t)=f'\left(t+\frac{x}{2}\right)+f'\left(-t+\frac{x}{2}\right)$
I suppose that you can proceed on the same manner than above in order to find the function $f$.
If not, edit what you did and where you faced a difficulty.
HINT : Check your final result which should be
$$u(x,t)=\frac14\left(\cos(x-2t)-\cos(x+2t) \right)$$