The "4" comes from the original equation so you should include it "at the beginning". Taking \(\displaystyle u(x, t)= X(x)T(t)\) the equation \(\displaystyle u_{xx}- 4u_{tt}= 0\) becomes \(\displaystyle TX''- 4XT''= 0\), \(\displaystyle TX''= 4XT''\) and, dividing by XT as you do, \(\displaystyle \frac{X''}{X}= 4\frac{T''}{T}\). Yes, since the left side is a function of x only and the right side a function of t only, and x and t are independent variables, we could change t while not changing x. In that case, since x has not changed, the left side would stay constant which means the right side must stay constant even though t has changed: for all t \(\displaystyle 4\frac{T''}{T}\) is a constant. Changing x but not t similarly shows that \(\displaystyle \frac{X''}{X}\) is a constant. Calling that constant c we have \(\displaystyle \frac{X''}{X}= c\) so \(\displaystyle X''= cX\) and \(\displaystyle 4\frac{T''}{T}= 0\) so \(\displaystyle T''= \frac{1}{4}T\).

Now, yes, there are three distinctly different cases:

1) c= 0. So we have \(\displaystyle X''= 0\) and \(\displaystyle T''= 0\) so that X= ax+ b and T= ct+ d for constants a, b, c, and d.

2) c> 0. Since c is positive we can write \(\displaystyle c= \lambda^2\) for some real number \(\displaystyle \lambda\) so that \(\displaystyle c= \pm\lambda\). So we have \(\displaystyle X''= \lambda X\) and \(\displaystyle T''= \lambda T\). Each of those has characteristic equation \(\displaystyle r^2= \lambda^2\) which has roots \(\displaystyle \lambda\) and \(\displaystyle -\lambda\). The general solutions are \(\displaystyle X= ae^{\lambda t}+ be^{-\lambda t}\) and \(\displaystyle T= ce^{\lamba t}+ de^{\lambda t}\)

3) c< 0. Since c is negative, we can write \(\displaystyle c= -\lambda^2\) for some real number \(\displaystyle \lambda\) so that \(\displaystyle c= \pm \lambda i\) So we have \(\displaystyle X''= \lambda i X\) and \(\displaystyle T''= \lambda I T\). As before, we can write the solutions \(\displaystyle X= ae^{i\lambda x}+ be^{-i\lambda x}\) and \(\displaystyle T= ce^{i\lambda t}+ de^{-i\lambda t}\). Of course, exponentials with *imaginary* exponents can be written as sine and cosine, \(\displaystyle e^{iax}= cos(ax)+ isin(ax)\) so those can both be written as \(\displaystyle X= acos(\lambda x)+ bsin(\lambda x)\) and \(\displaystyle T= c cos(\lambda t)+ d sin(\lambda t)\).

But you have forgotten a very important part of the problem- The **initial** and **boundary** conditions! Those are what determine which case we are dealing with. For example, suppose the boundary conditions are that x(0)= 0 and x(L)= 0 for some non-zero number L. The only way \(\displaystyle X= ax+ b\) can be 0 at both x= 0 and x= L is if X is identically 0: X(0)= b= 0 and then X(L)= aL+ 0= 0 so a= 0. Similarly, the only way \(\displaystyle ae^{\lambda x}+ be^{-\lambda x}\) can satisfy X(0)= X(L)= 0 is if both a and b are 0: \(\displaystyle X(0)= ae^0+ be^0= a+ b= 0\) and \(\displaystyle X(L)= ae^{\lamba L}+ be^{-\lambda L}= 0. From a+ b= 0, b= -a so the second equation becomes \(\displaystyle ae^{\lambda L}- ae^{-\lambda L}= a(e^{\lambda L}- e^{-\lambda})= 0\). But \(\displaystyle e^{\lambda L}- e^{-\lambda L}\) **can't** be 0- one of the exponents is positive while the other negative so one o the exponential is greater than 1 while the other is less than 1. Again the we must have b= -a= 0.

But if \(\displaystyle X= acos(\lamba x)+ bsin(\lambda x)\) then \(\displaystyle X(0)= a= 0\) and \(\displaystyle X(L)= a cos(\lambda L)+ b sin(\lambda L)= b sin(\lambda L)= 0\) so **either** b= 0, giving the "trivial solution", X(x)= 0 for all x, **or** \(\displaystyle \lambda L\) is a multiple of \(\displaystyle \pi\). If \(\displaystyle \lambda L= n\pi\), for integer n, then \(\displaystyle \lambda= \frac{n \pi}{L}\) giving solution \(\displaystyle X(x)= b sin(\frac{n\pi}{L})\). The "b" is determined by the initial condition and the fact that n can be any integer gives rise to a sum over integers, the "Fourier series".

As for "when we looked at the c = 0 case he left the solution as two separate expressions, one being the constant and one being a linear equation. When we looked at the exponential case he multiplied one by the other", yes, you saw that in *ordinary* differential equations. If \(\displaystyle \frac{dy}{dx}= a\) so that \(\displaystyle dy= adx\) then, integrating, \(\displaystyle y= ax+ c\) where c is an arbitrary constant. If \(\displaystyle \frac{dy}{dx}= ay\) so that \(\displaystyle dy= ay dx\) we cannot immediately integrate since on the right we are integrating with respect to x but have y, an unknown function of x. Instead divide both sides by y: \(\displaystyle \frac{dy}{y}= a dx\) and then integrate to get \(\displaystyle ln(y)= ax+ c\). Solve for y by taking the exponential of both sides: \(\displaystyle y= e^{ax+ c}= e^ce^{ax}= Ce^{ax}\) where \(\displaystyle C= e^c\).\)