Prove that if $ u(x,t) = f(x-ct) + g(x + ct)$ then $u_{tt} = c^2 u_{xx}$ 
Prove that if $$ u(x,t) = f(x-ct) + g(x + ct)$$ then $$u_{tt} = c^2 u_{xx}$$

My approach:
Let $f(x-ct) = f(A)$ and $g(x+ct)=g(B)$
$$ u_t = \frac{\partial u}{\partial t} = \frac{\partial f}{\partial A }\frac{\partial A}{\partial t } + \frac{\partial f }{\partial B } \frac{\partial B }{\partial t } $$
$$ u_{tt} = \frac{\partial }{\partial t} \left(  \frac{\partial u}{\partial t }  \right) = \frac{\partial^2 f }{\partial t \partial A } \cdot \frac{\partial    A}{\partial t } + \frac{\partial f }{\partial A }  \cdot \frac{\partial^2 A }{\partial t^2 }   +  \frac{\partial^2 f}{\partial t \partial B } \cdot \frac{\partial B }{\partial t} + \frac{\partial f }{\partial B } \cdot \frac{\partial^2 B }{\partial B \partial t } $$
Evaluating some partials
$$\frac{\partial A }{\partial t } = -c ,  \frac{\partial^2 A }{\partial t^2} =0, \frac{\partial B }{\partial t } =c , \frac{\partial^2 B }{\partial t^2 } =0$$
hence
$$u_{tt} =\frac{\partial^2 f }{\partial t \partial A } \cdot -c + \frac{\partial^2 f }{\partial t \partial B }\cdot c$$
Using similar approach,
$$ u_{xx} =\frac{\partial^2 f }{\partial x \partial A } + \frac{\partial^2 f }{\partial x \partial B }$$
Is what I did correct? I am stuck at this level. What needs to be done to complete the proof?
 A: As @Mattos and @Did have suggested we will use the following conventions:
$$f(x-ct)=f(A(x,t))\qquad A(x,t)=x-ct$$
$$g(x+ct)=g(B(x,t))\qquad B(x,t)=x+ct$$
Let us first evaluate the partial derivatives of $A$ and $B$:
$$\frac{\partial A}{\partial x} = 1\qquad \frac{\partial A}{\partial t}=-c\qquad
\frac{\partial B}{\partial x} = 1\qquad \frac{\partial B}{\partial t} = c$$
Then we proceed to evaluate $u_{xx}$ and $u_{tt}$, first for $x$:
$$u(x,t)=f(A(x,t))+g(B(x,t))$$ hence
$$
\frac{\partial u}{\partial x} = f'(A(x,t)) \frac{\partial  A}{\partial x}+ g'(B(x,t))\frac{\partial  B}{\partial x}= f'(A(x,t))+g'(B(x,t))$$
and
$$
\frac{\partial^2u}{\partial x^2} = \frac{\partial}{\partial x}(f'(A(x,t))+g'(B(x,t)))=f''(A(x,t))\frac{\partial A}{\partial x }+g''(B(x,t))\frac{\partial B}{\partial x}$$ that is,
$$\frac{\partial^2u}{\partial x^2} = f''(A(x,t))+g''(B(x,t))$$
Likewise, with respect to $t$:
$$
\frac{\partial u}{\partial t} = f'(A(x,t)) \frac{\partial  A}{\partial t}+ g'(B(x,t))\frac{\partial  B}{\partial t}= -cf'(A(x,t))+cg'(B(x,t))$$
and $$
\frac{\partial^2u}{\partial t^2} = \frac{\partial}{\partial t}(-cf'(A(x,t))+cg'(B(x,t)))=-cf''(A(x,t))\frac{\partial A}{\partial t }+cg''(B(x,t))\frac{\partial B}{\partial c}$$ that is, $$
\frac{\partial^2u}{\partial t^2}= c^2f''(A(x,t))+c^2g''(B(x,t))$$
Now we can show the desired equality:
$$\frac{\partial^2u}{\partial t^2}=c^2f''(A(x,t))+c^2g''(B(x,t))=c^2(f''(A(x,t))+g''(B(x,t)))=c^2\frac{\partial^2 u}{\partial x^2}$$
therefore,
$$u_{tt}=c^2u_{xx}$$
as required.
A: $$ \frac{\partial}{\partial t}\left( f'(A(x,t))\frac{\partial A}{\partial t} \right) = \left( f''(A(x,t))\frac{\partial A}{\partial t} \right )\frac{\partial A}{\partial t} + f'(A(x,t))\left( \frac{\partial^2 A}{\partial t^2}  \right) $$ i.e. $$ \frac{\partial}{\partial t}\left( f(A(x,t))\frac{\partial A}{\partial t} \right) = f''(A(x,t))\left(\frac{\partial A}{\partial t}\right)^2 +f'(A(x,t)) \left( \frac{\partial^2 A}{\partial t^2}  \right)$$ So given that $\frac{\partial^2 A}{\partial t^2}  = 0 $ you have $$ \frac{\partial}{\partial t}\left( f(A(x,t))\frac{\partial A}{\partial t} \right) = f''(A(x,t))\left(\frac{\partial A}{\partial t}\right)^2 $$
