Fourier transform of the wave equation 
On the LHS side of the highlighted expression should it not read:
$\displaystyle \frac {d^2 \hat{u}}{dt^2}$
as the Leibniz Integral rule requires you to transform the partial derivative to a straight derivative when you move it outside the integral?
 A: As you observed in your comment, $\omega$ and $t$ are independent. 
The Fourier transform $u \mapsto \hat{u}$ is performed at every fixed $t$ as a transformation on the variable $x$, and since $x$ and $t$ are independent, so is $\omega$ and $t$. 
A: for ease of typing i will set $c = 1.$ we will look for an even solution using cosine transform $$\hat u(\omega, t) = \int_0^\infty u (x)\cos \omega x\, dx$$
multiplying $u_{tt} = u_{xx}$ by $\cos \omega x$ and integrating from $0$ to $\infty,$  we get 
$$\begin{align}\frac{d^2}{dt^2}\int_0^\infty u \cos \omega x\, dx &= \int_0^\infty u_{xx} \cos \omega x\, dx \\
&=u_x \cos \omega x\big|_0^\infty+\omega\int_0^\infty\sin \omega x \, u _x\, dx\\
&=\omega \sin \omega x \,u\big|_0^\infty -\omega^2\int_0^\infty u\cos \omega x\, dx\\
&=-\omega^2\int_0^\infty u\cos \omega x\, dx \end{align}$$ we have
$$\frac{d^2}{dt^2}\hat u = -\omega^2 \hat u $$ we will take $$ \hat u = A \cos \omega t.$$
at $t = 0$ we have $$A = 4\int_0^\infty e^{-5x}\cos \omega x \, dx = \frac{20 \cos \omega x}{\omega^2 + 25} + \frac{4\omega \sin \omega x}{\omega^2 + 25} $$  now we have $$\hat u = \frac{20 \cos \omega x \cos \omega t}{\omega^2 + 25} + \frac{4\omega \sin \omega x\cos \omega t }{\omega^2 + 25}  $$
i will have to look up the inverse cosine transforms. i will get back to it later.
A: The details of switching order of integration and differentiation are non-trivial. For example,
$$
       \int_{-\infty}^{\infty}u_{t}(x,t)e^{-i\omega x}dx\; ? = ? \;\frac{\partial }{\partial t}\int_{-\infty}^{\infty}u(x,t)e^{-i\omega x}dx.
$$
There is no doubt that in a classical pointwise setting, the proper notation on the right is a partial derivative because the integral expression depends on two variables, $t$ and $\omega$, and you're forming a derivative with respect to $t$ while holding $\omega$ constant. However, this derivative is a non-trivial thing:
$$
    \lim_{\Delta t\rightarrow 0}\int_{-\infty}^{\infty}\frac{u(x,t+\Delta t)-u(x,t)}{\Delta t}e^{-i\omega x}dx.
$$
In general it's very difficult to prove such a limit exists because the convergence has to take place for all $x$ at once, in such a way that the limit may be interchanged with the integral. That's non-trivial to verify.
Using integrals sometimes helps because orders of integration are easier to interchange. For example, assume $u_{t}$ is absolutely integrable in $x$ for each $t$ and that the following is a continuous function of $t$ for fixed $\omega$:
$$
    t\mapsto \int_{-\infty}^{\infty}u_{t}(x,t)e^{-i\omega x}dx.
$$
Showing continuity of such a thing is a chore in itself, but easier than the derivative problem. Then you can integrate the continuous function of $t$ and interchange orders of integration to obtain
$$
\begin{align}
    \int_{0}^{t}\int_{-\infty}^{\infty}u_{t}(x,t')e^{-i\omega x}dx
            & = \int_{-\infty}^{\infty}\int_{0}^{t}u_{t}(x,t')dt' e^{-i\omega x}dx \\
            & = \int_{-\infty}^{\infty}\{u(x,t)-u(x,0)\}e^{-i\omega x}dx.
\end{align}
$$
Because the integrand on the left is assumed to be a continuous function of $t'$, then the double integral is a continuously differentiable function of $t$, which guarantees that the same is true of the right. And the derivative with respect to $t$ on the left is the inner integral, which then gives the existence of the derivative with respect to $t$ on the right. That gives
$$
              \int_{-\infty}^{\infty}u_{t}(x,t)e^{-i\omega x}dx = \frac{\partial}{\partial t}\int_{-\infty}^{\infty}u(x,t)e^{-i\omega x}dx.
$$
This is easier to verify, but it's still not trivial because the continuity must be shown with respect to a vector function; this can be accomplished in many cases, however, by looking at uniform convergence of the integral on $[-R,R]$ and then analyzing the truncated integral.
It's astute of you ask about this; most people gloss over details of this type. This gets into general theories of $C^{0}$ semigroups, where you are really taking the derivative of a vector function in a normed space.
$$
          \lim_{\Delta t\rightarrow 0}\left\|\frac{1}{\Delta t}\{ u(t+\Delta t)-u(t) \}-u'(t)\right\|_{L^{1}(\mathbb{R})} = 0,
$$
where $u(t)$ is a function from $\mathbb{R}$ to $L^{1}(\mathbb{R})$ so that $u(t,x)$ really means $(u(t))(x)$ in this context. This turns into thick operator theory fairly quickly. But this is unavoidable if you want to do these things correctly, because you really are taking the derivative of an entire distribution function all at once. You may have to work in $L^{2}$ in this case instead of $L^{1}$ to do a good job of everything, which really moves the theory out of the classical pointwise way of looking at things.
Reference: Amnon Pazy Semigroups of Linear Operators and Applications to Partial Differential Equations.
Sometimes its just better to asssume you can interchange integration and differentiation and check the final answer. That's what I'll do here.
General Solution (assuming the operations are justified): The final solution you have given is
$$
     \hat{u}(\omega,t) = A(\omega)\cos(\omega ct)+B(\omega)\sin(\omega ct).
$$
The solution as a function of $x$ would be
$$
     u(x,t) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}\{A(\omega)\cos(\omega c t)+B(\omega)\sin(\omega c t)\} e^{i\omega x}d\omega.
$$
Therefore,
$$
\begin{align}
         u(x,0) & = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}A(\omega)e^{i\omega x}d\omega \\
          A(\omega) & = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}u(x,0)e^{-i\omega x}dx,
\end{align}
$$
and
$$
\begin{align}
       u_{t}(x,0) & = \frac{c}{\sqrt{2\pi}}\int_{-\infty}^{\infty}B(\omega)\omega e^{i\omega x}dx \\
        \omega B(\omega) & = \frac{1}{c\sqrt{2\pi}}\int_{-\infty}^{\infty}u_{t}(x,0)e^{-i\omega x}dx \\
          B(\omega) & = \frac{1}{c\omega\sqrt{2\pi}}\int_{-\infty}^{\infty}u_{t}(x,0)e^{-i\omega x}dx.
\end{align}
$$
Therefore,
$$
   \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}A(\omega)\cos(\omega c t)d\omega
         \\
    = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}(u(x,0))^{\wedge}(\omega)\frac{1}{2}\{e^{i\omega ct}+e^{-i\omega ct}\}e^{i\omega x}d\omega \\
    = \frac{1}{2}\{ u(x+ct,0)+u(x-ct,0)\}
$$
Similarly,
$$
   \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}B(\omega)\sin(\omega c t)d\omega \\
   = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}\frac{(u_{t}(x,0))^{\wedge}(\omega)}{c\omega}\sin(\omega ct)d\omega \\
   = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}(u_{t}(x,0))^{\wedge}(\omega)\left(\int_{0}^{t}\cos(\omega ct')dt'\right)d\omega \\
   = \int_{0}^{t}\left(\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}(u_{t}(x,0))^{\wedge}(\omega)\cos(\omega ct')d\omega\right)dt' \\
   = \int_{0}^{t}\frac{1}{2}\{ u_{t}(x+ct',0)+u_{t}(x-ct',0) \}dt'
$$
The suggested solution is
$$
\begin{align}
   u(x,t) & = \frac{1}{2}\{u(x+ct,0)+u(x-ct,0)\} \\
          & + \int_{0}^{t}\frac{1}{2}\{u_{t}(x+ct',0)+u_{t}(x-ct',0)\}dt',
\end{align}
$$
where the functions $u(x,0)=a(x)$ and $u_{t}(x,0)=b(x)$ must be given. Test this out:

$$
      u(x,t) = \frac{1}{2}\{a(x+ct)+a(x-ct)\}+\frac{1}{2}\int_{0}^{t}\{b(x+ct')+b(x-ct')\}dt'.
$$

Check the Solution: The conditions match:
$$
\begin{align}
   u(x,0) & = \frac{1}{2}\{ a(x+0)+a(x-0)\} = a(x),\\
   u_{t}(x,0) & = \frac{1}{2}\{ a'(x+0)-a'(x-0)\} \\
              & +\frac{1}{2}\{ b(x+0)+b(x-0)\} =b(x).
\end{align}
$$
It's easy to verify that $a(x+ct)$ and $a(x-ct)$ satisfy the partial differential equation. The same is true of the other terms:
$$
\begin{align}
   2\left(\frac{\partial^{2}}{\partial t^{2}}-c^{2}\frac{\partial^{2}}{\partial x^{2}}\right)&\int_{0}^{t}b(x+ct')+b(x-ct')dt' \\
  & = cb'(x+ct)+cb'(x-ct)  \\
  & - c^{2}\int_{0}^{t}b''(x+ct')+b''(x-ct')dt' \\
  & = cb'(x+ct)+cb'(x-ct) \\
  & - c\{b'(x+ct)-b'(x)-b'(x-ct)+b'(x)\} \\
  & = 0.
\end{align}
$$
So the Fourier solution works with only mild restrictions on the smoothness of $a$ and $b$.
A: First of all, note that $\hat{u}(\omega,t)$ denotes the Fourier transform with respect to $x$, i.e.
$$\hat{u}(\omega,t) = \int e^{\imath \, \omega x} \cdot u(x,t) \, dx.$$
In particular, $\hat{u}$ is a function mapping $\mathbb{R} \times [0,\infty)$ to $\mathbb{R}$; therefore, the expression
$$\frac{d}{dt} \hat{u}(x,t)$$
is not even well-defined. How do you define $$\frac{d}{dy_1} f(y_1,y_2)$$ for a function $f: \mathbb{R}^2 \to \mathbb{R}$? There is no such thing. What does exist is, however, the partial derivative, i.e.
$$\frac{\partial}{\partial t} \hat{u}(x,t);$$ 
and that's exactly what's written in the green box.

Concerning Leibniz integral rule: Note that we apply this rule for each fixed $\omega \in \mathbb{R}$, i.e. we define
$$V_{\omega}(t) := \int e^{\imath \, \omega x} \cdot u(x,t) \, dx$$
for some fixed $\omega$ and get
$$\frac{d}{dt} V_{\omega}(t) = \int e^{\imath \, \omega x} \frac{\partial}{\partial t} u(x,t) \, dx .$$
Now it follows from the very definition of the partial derivative,
$$\frac{\partial}{\partial t} \hat{u}(\omega,t) = \frac{d}{dt} V_{\omega}(t) = \int e^{\imath \, \omega x} \frac{\partial}{\partial t} u(x,t) \, dx.$$
Repeating this argumentation, we obtain the corresponding result for derivatives of higher order.
