You are assuming the production from of the solutions

this gives that

and

So the PDE gives us

Now isolating the T's and X's gives

Now since this equality must hold for all values of x and t each side of the equation must be constant this gives

or the 2 ODE's

Now to answer you second question:

First note the the boundary conditions

Using the X equation above gives

Now if we multiply this by and integrate we get

If we integrate the first integral by parts with

we get

Now using the boundary conditions we get

Notice that both of the integrands are nonnegative, So the only way this equation can be true is if . This is why the separation constant is