**a)** Dirichlet boundary condition at $x=0$ means we need an odd continueation of $u|_{t=0}$ and $u_t|_{t=0}$; That is

$$u|_{t=0}=0,\qquad x<0$$

$$u_t|_{t=0}=-1,\qquad x<0 $$

By application of d'Alembert's formula, solution to this problem is

$$u(t,x)=\frac{1}{4}\Bigl[\int_0^{x+2t}1\mathrm{d}s+\int_{x-2t}^0-1\mathrm{d}s\Bigr]$$

$$= \frac{1}{2}x$$

**b)** Neumann boundary condition at $x=0$ means we need an even continueation of $u|_{t=0}$ and $u_t|_{t=0}$; That is

$$u|_{t=0}=0,\qquad x<0$$

$$u_t|_{t=0}=1,\qquad x<0 $$

since both functions are even.

By application of d'Alembert's formula, solution to this problem is

$$u(t,x)=\frac{1}{4}\Bigl[\int_0^{x+2t}1\mathrm{d}s+\int_{x-2t}^01\mathrm{d}s\Bigr]$$

$$= t$$

**c)** Dirichlet boundary condition at $x=0$ means we need an odd continueation of $u|_{t=0}$ and $u_t|_{t=0}$; That is

$$u|_{t=0}=0,\qquad x<0$$

$$u_t|_{t=0}=x,\qquad x<0 $$

since both functions are odd.

By application of d'Alembert's formula, solution to this problem is

$$u(t,x)=\frac{1}{4}\Bigl[\int_0^{x+2t}x\mathrm{d}s+\int_{x-2t}^0x\mathrm{d}s\Bigr]$$

$$= \frac{1}{8}\Bigl[(x+2t)^2+(x-2t)^2\Bigr]$$

$$=xt$$

**d)** Neumann boundary condition at $x=0$ means we need an even continueation of $u|_{t=0}$ and $u_t|_{t=0}$; That is

$$u|_{t=0}=0,\qquad x<0$$

$$u_t|_{t=0}=-x,\qquad x<0 $$

By application of d'Alembert's formula, solution to this problem is

$$u(t,x)=\frac{1}{4}\Bigl[\int_0^{x+2t}x\mathrm{d}s+\int_{x-2t}^0-x\mathrm{d}s\Bigr]$$

$$= \frac{1}{8}\Bigl[(x+2t)^2-(x-2t)^2\Bigr]$$

$$=\frac{1}{4}x^2+t^2$$

edit: No need to say all solutions are for $x<2t$.

edit: Fixed integral limits.