$$u_{tt} - u_{xx} = 0$$
The general solution (without boundary condition) is :
$$u(x,y)=f(x+t)+g(x+t)$$
The functions $f$ and $g$ are not necessarily the same.
The condition $u(x,0) = \phi(x)=f(x)+g(x)$ implies
$\quad\begin{cases}
f(x)=\frac12\phi(x)+h(x) \\
g(x)=\frac12\phi(x)-h(x)
\end{cases}$
$$ u(x,t)=\frac12\phi(x+t)+h(x+t)+\frac12\phi(x-t)-h(x-t)$$
$h(x)$ is an arbitrary function to be determined by the condition $u_t(x,0)=0$
$$ u_t(x,t)=\frac12\phi'(x+t)+h'(x+t)-\frac12\phi'(x-t)+h'(x-t)$$
$$ u_t(x,0)=\frac12\phi'(x)+h'(x)-\frac12\phi'(x)+h'(x)$$
$$u_t(x,0)=0=2h'(x) \quad\implies\quad h(x)=C$$
Your solution is confirmed :
$$ u(x,t)=\frac12\phi(x+t)+\frac12\phi(x-t)$$
The function $\phi$ is a given piecewise function :
$$\phi(x) = \begin{cases}
1 & |x| \leq 1 \\
0 & |x| > 1 \\
\end{cases}$$
$$ u(x,t)=\frac12\begin{cases}
1 & x+t \leq 1 \\
1 & -x-t \leq 1 \\
0 & x+t > 1 \\
0 & -x-t > 1 \\
\end{cases}+
\frac12\begin{cases}
1 & x-t \leq 1 \\
1 & -x+t \leq 1 \\
0 & x-t > 1 \\
0 & -x+t > 1 \\
\end{cases}$$
$$ u(x,t)=\frac12\begin{cases}
1 & x \leq 1-t \\
1 & x \geq -1-t \\
0 & x > 1-t \\
0 & x < -1-t \\
\end{cases}+
\frac12\begin{cases}
1 & x \leq 1+t \\
1 & x \geq -1+t \\
0 & x > 1+t \\
0 & x < -1+t \\
\end{cases}$$
We have to consider several regions limited by
$x=1-t \quad;\quad x=1+t \quad;\quad x=-1-t \quad;\quad x=-1+t\quad$
For $\quad \boxed{0<t<1}$ :
Case $\quad x>1+t \:: \quad u=\frac12(0)+\frac12(0)=0$.
Case $\quad 1-t<x\leq 1+t \: : \quad u=\frac12(0)+\frac12(1)=\frac12$.
Case $\quad -1+t<x\leq 1-t \: : \quad u=\frac12(1)+\frac12(1)=1$.
Case $\quad -1-t\leq x< -1+t \: : \quad u=\frac12(1)+\frac12(0)=\frac12$.
Case $\quad x\leq -1-t \: : \quad u=\frac12(0)+\frac12(0)=0$.
$$u(x,t)=\begin{cases}
0 && x>1+t \\
\frac12 && 1-t<x\leq 1+t \\
1 && -1+t<x\leq 1-t\\
\frac12 && -1-t\leq x< -1+t\\
0 && x\leq -1-t
\end{cases}$$
The above formulas are not valid for $t>1$ which is outside the domain of study specified in the wording of the question.
IN ADDITION :
For $\quad \boxed{t>1}$ :
$$u(x,t)=\begin{cases}
0 && x>1+t \\
\frac12 && -1+t<x\leq 1+t \\
0 && 1-t<x\leq -1+t\\
\frac12 && -1-t\leq x< 1-t\\
0 && x\leq -1-t
\end{cases}$$
Lul maybe I asked too specifically, let me know if I solve the equation wrong.
If we let $u(x, t) = f(y) = f(x - ct)$, then $u_{tt} = c^2 f''(y), u_{xx} = f''(y)$, and the original equation becomes \begin{equation}
\begin{split}
u_{tt} - u_{xx} = (c^2 - 1) f'' &= - \sin f \\
\Rightarrow (1 - c^2) f'' - \sin f &= 0; \\
(1 - c^2) f'' f' - (\sin f)(f') &= 0; \\
\Rightarrow 0.5(1 - c^2)(f')^2 + (\cos f) &= A, A \in \mathbb{R}.
\end{split}
\end{equation} Given $u_x(\pm \infty, t) = f'(\pm \infty) = 0, \cos u(\pm \infty, t) = \cos (0$ or $2\pi) = 0$, we get $A = 1$. Then \begin{equation}
\begin{split}
\dfrac{1 - c^2}{2} \left(\dfrac{df(y)}{dy}\right)^2 = 1 - \cos (f(y)) \Rightarrow \dfrac{df(y)}{dy} &= \pm \sqrt{\dfrac{2(1 - \cos (f(y)))}{1 - c^2}}; \\
\dfrac{df(y)}{\sqrt{2(1 - \cos (f(y)))}} = \dfrac{df(y)}{\sin (0.5f(y))} &= \pm \dfrac{dy}{\sqrt{1 - c^2}}; \\
\Rightarrow \ln \left(\csc \left[\dfrac{f(y)}{2}\right] + \cot\left[\dfrac{f(y)}{2}\right]\right) = \ln \left(\tan \left[\dfrac{f(y)}{4}\right]\right) &= \pm \dfrac{y}{\sqrt{1 - c^2}}; \text{ (separation of variables)} \\
\Rightarrow u(x, t) = f(x - ct) &= 4 \arctan \left[\exp\left(\pm \dfrac{x - ct}{\sqrt{1 - c^2}}\right)\right]. \text{ } \Box
\end{split}
\end{equation}
Best Answer
You should only ask questions about a single problem. This is not the place for a homework dump.
With that being said, I'm going to solve the first problem. First, define the primitive of $u_t(x,0)=g(x)$ as
$$ G(s) = \int g(s)\ ds = \begin{cases} \dfrac{1}{\pi}\sin\big(\pi(s-1)\big), & 1 < s < 2 \\ 0, & \text{otherwise} \end{cases} $$
Then the solution given by d'Alembert's formula is
$$ u(x,t) = \frac{G(x+t) - G(x-t)}{2} $$
where you have to check case by case for both $x+t$ and $x-t$. Below is a graph ($x$ vs. $t$) of the 4 characteristic lines going through $x=1$ and $x=2$.
The numbered regions are as follows:
\begin{array}{rrr} \text{I}: && x - t < 1, && x + t < 1 \\ \text{II}: && x - t < 1, && 1 < x + t < 2 \\ \text{III}: && x - 1 < 1, && x + t > 2 \\ \text{IV}: && 1 < x - t < 2, && 1 < x + t < 2 \\ \text{V}: && 1 < x - t < 2, && x + t > 2 \\ \text{VI}: && x - t > 2, && x + t > 2 \\ \end{array} Then, you can simplify the solution
$$ u(x,t) = \begin{cases} 0, && (x,t) \in \text{I, III, VI} \\ \dfrac{1}{2\pi}\sin\big(\pi(x+t-1)\big), && (x,t) \in \text{II} \\ \dfrac{1}{2\pi}\Big[\sin\big(\pi(x+t-1)\big) - \sin\big(\pi(x-t-1)\big) \Big], && (x,t) \in \text{IV} \\ -\dfrac{1}{2\pi}\sin\big(\pi(x-t-1)\big), && (x,t) \in \text{V} \end{cases} $$